mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
18 lines
477 B
TypeScript
18 lines
477 B
TypeScript
import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from "typeorm";
|
|
import { SpotifyLibraryDetails } from "../sources/spotify/spotify-library-details.entity";
|
|
import { Album } from "./album.entity";
|
|
|
|
@Entity()
|
|
export class Artist {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column()
|
|
name: string;
|
|
|
|
@ManyToMany((type) => Album, (album) => album.artists)
|
|
albums?: Album[];
|
|
|
|
@Column((type) => SpotifyLibraryDetails)
|
|
spotify: SpotifyLibraryDetails;
|
|
}
|