16 lines
452 B
TypeScript
16 lines
452 B
TypeScript
import { RaceWithSOFDTO } from '@/lib/types/generated/RaceWithSOFDTO';
|
|
|
|
import { ViewModel } from "../contracts/view-models/ViewModel";
|
|
|
|
export class RaceWithSOFViewModel extends ViewModel {
|
|
id: string;
|
|
track: string;
|
|
strengthOfField: number | null;
|
|
|
|
constructor(dto: RaceWithSOFDTO) {
|
|
super();
|
|
this.id = dto.id;
|
|
this.track = dto.track;
|
|
this.strengthOfField = 'strengthOfField' in dto ? dto.strengthOfField ?? null : null;
|
|
}
|
|
} |