Files
gridpilot.gg/apps/website/lib/view-models/RaceStatsViewModel.ts
2026-01-12 01:01:49 +01:00

19 lines
416 B
TypeScript

import type { RaceStatsDTO } from '@/lib/types/generated/RaceStatsDTO';
/**
* Race stats view model
* Represents race statistics for display
*/
export class RaceStatsViewModel {
totalRaces: number;
constructor(dto: RaceStatsDTO) {
this.totalRaces = dto.totalRaces;
}
/** UI-specific: Formatted total races */
get formattedTotalRaces(): string {
return this.totalRaces.toLocaleString();
}
}