import { Entity, OneToMany } from 'typeorm'; import { MultiNamed } from './bases/multiNamed'; import { Source } from './source'; @Entity() export class Site extends MultiNamed { @OneToMany(() => Source, source => source.site, { nullable: false, onDelete: 'CASCADE', onUpdate: 'CASCADE', }) public sources: Promise; }