/** * View Model for League Schedule * * Service layer maps DTOs into these shapes; UI consumes ViewModels only. */ export interface LeagueScheduleRaceViewModel { id: string; name: string; scheduledAt: Date; formattedDate: string; formattedTime: string; isPast: boolean; isUpcoming: boolean; status: string; track?: string; car?: string; sessionType?: string; isRegistered?: boolean; } export class LeagueScheduleViewModel { readonly races: LeagueScheduleRaceViewModel[]; constructor(races: LeagueScheduleRaceViewModel[]) { this.races = races; } get raceCount(): number { return this.races.length; } get hasRaces(): boolean { return this.raceCount > 0; } }