view data fixes
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 7m11s
Contract Testing / contract-snapshot (pull_request) Has been skipped

This commit is contained in:
2026-01-24 23:29:55 +01:00
parent c1750a33dd
commit 1b0a1f4aee
134 changed files with 10380 additions and 415 deletions

View File

@@ -1,6 +1,25 @@
import { ViewModel } from "../contracts/view-models/ViewModel";
export interface LeagueScheduleRaceViewModel extends ViewModel {
export class LeagueScheduleRaceViewModel extends ViewModel {
constructor(private readonly data: any) {
super();
}
get id(): string { return this.data.id; }
get name(): string { return this.data.name; }
get scheduledAt(): Date { return new Date(this.data.scheduledAt); }
get formattedDate(): string { return this.data.formattedDate; }
get formattedTime(): string { return this.data.formattedTime; }
get isPast(): boolean { return this.data.isPast; }
get isUpcoming(): boolean { return this.data.isUpcoming; }
get status(): string { return this.data.status; }
get track(): string | undefined { return this.data.track; }
get car(): string | undefined { return this.data.car; }
get sessionType(): string | undefined { return this.data.sessionType; }
get isRegistered(): boolean | undefined { return this.data.isRegistered; }
}
export interface ILeagueScheduleRaceViewModel extends ViewModel {
id: string;
name: string;
scheduledAt: Date;