2020-04-10 04:04:13 +02:00
|
|
|
import { Entity, ManyToMany, PrimaryColumn } from 'typeorm';
|
2020-04-10 05:02:19 +02:00
|
|
|
import { Work } from './work';
|
2019-06-23 02:30:24 +02:00
|
|
|
|
|
|
|
@Entity()
|
2021-01-24 19:11:45 +01:00
|
|
|
export class Language implements LanguageEntityInterface {
|
2020-04-10 04:04:13 +02:00
|
|
|
@PrimaryColumn()
|
2020-07-25 02:02:37 +02:00
|
|
|
public code!: string;
|
2019-06-23 02:30:24 +02:00
|
|
|
|
2021-01-24 19:11:45 +01:00
|
|
|
@ManyToMany(() => Work, (work: WorkEntityInterface) => work.languages)
|
|
|
|
public works!: Promise<WorkEntityInterface[]>;
|
2019-06-23 02:30:24 +02:00
|
|
|
}
|