35 lines
929 B
TypeScript
35 lines
929 B
TypeScript
export enum SongType {
|
|
YouTube,
|
|
Spotify
|
|
}
|
|
|
|
|
|
export class Song {
|
|
constructor(public type: SongType, public title: string, public songId: string, public image: string) {
|
|
|
|
}
|
|
}
|
|
|
|
export class QueuedSong extends Song {
|
|
constructor(type: SongType, title: string, songId: string, image: string, public listener: string) {
|
|
super(type, title, songId, image);
|
|
}
|
|
}
|
|
|
|
export class PlayingSong extends QueuedSong {
|
|
constructor(type: SongType, title: string, songId: string, image: string, listener: string, public length: number, public position: number) {
|
|
super(type, title, songId, image, listener);
|
|
}
|
|
}
|
|
|
|
export class Playlist {
|
|
constructor(public title: string, public listener: string, public songs: Song[]) {
|
|
}
|
|
}
|
|
export class PlaylistDescription {
|
|
constructor(public title: string, public listener: string) {
|
|
this.title = title;
|
|
this.listener = listener;
|
|
}
|
|
}
|