website refactor
This commit is contained in:
42
apps/website/lib/view-data/races/RaceResultsViewData.ts
Normal file
42
apps/website/lib/view-data/races/RaceResultsViewData.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Race Results View Data
|
||||
*
|
||||
* ViewData for the race results page template.
|
||||
* JSON-serializable, template-ready data structure.
|
||||
*/
|
||||
|
||||
export interface RaceResultsResult {
|
||||
position: number;
|
||||
driverId: string;
|
||||
driverName: string;
|
||||
driverAvatar: string;
|
||||
country: string;
|
||||
car: string;
|
||||
laps: number;
|
||||
time: string;
|
||||
fastestLap: string;
|
||||
points: number;
|
||||
incidents: number;
|
||||
isCurrentUser: boolean;
|
||||
}
|
||||
|
||||
export interface RaceResultsPenalty {
|
||||
driverId: string;
|
||||
driverName: string;
|
||||
type: 'time_penalty' | 'grid_penalty' | 'points_deduction' | 'disqualification' | 'warning' | 'license_points';
|
||||
value: number;
|
||||
reason: string;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface RaceResultsViewData {
|
||||
raceTrack?: string;
|
||||
raceScheduledAt?: string;
|
||||
totalDrivers?: number;
|
||||
leagueName?: string;
|
||||
raceSOF: number | null;
|
||||
results: RaceResultsResult[];
|
||||
penalties: RaceResultsPenalty[];
|
||||
pointsSystem: Record<string, number>;
|
||||
fastestLapTime: number;
|
||||
}
|
||||
Reference in New Issue
Block a user