import { Entity, OneToMany } from 'typeorm';
import { BaseEntity } from '../base-entity';
import { MultiName, MultiNamed } from './base/multi-named';
import { Source } from './source';

@Entity()
export class Site extends MultiNamed(BaseEntity, 'SiteMultiName') {
  @OneToMany(
    () => Source,
    (source: Source) => source.site
  )
  public sources: Promise<Source[]>;
}

@Entity()
export class SiteMultiName extends MultiName('Site') {}
