import { Expose, Type } from 'class-transformer'; import { Race } from "./race.model"; import { SeasonStanding } from "./season-standing.model"; import { Racer } from './racer.model'; export class Season { @Expose() id: string = "0"; @Expose() title: string = ""; @Expose() subTitle: string = ""; @Expose() @Type(() => Date) startingDate: Date = new Date(0); @Expose() @Type(() => Race) races: Race[] = []; @Expose() @Type(() => Racer) racers: Racer[] = []; @Expose() @Type(() => SeasonStanding) standings: SeasonStanding[] = []; getStartingDate() { return this.startingDate.toUTCString(); } }