mirror of
https://github.com/apricote/Listory.git
synced 2026-02-08 18:57:03 +00:00
feat(server): save genres for artists and albums
This can later be used for reports
This commit is contained in:
parent
9b96d0fab4
commit
3c6f3289f1
12 changed files with 225 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import {
|
|||
} from "typeorm";
|
||||
import { SpotifyLibraryDetails } from "../sources/spotify/spotify-library-details.entity";
|
||||
import { Artist } from "./artist.entity";
|
||||
import { Genre } from "./genre.entity";
|
||||
import { Track } from "./track.entity";
|
||||
|
||||
@Entity()
|
||||
|
|
@ -25,6 +26,9 @@ export class Album {
|
|||
@OneToMany(() => Track, (track) => track.album)
|
||||
tracks?: Track[];
|
||||
|
||||
@ManyToMany(() => Genre)
|
||||
genres?: Genre[];
|
||||
|
||||
@Column(() => SpotifyLibraryDetails)
|
||||
spotify: SpotifyLibraryDetails;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue