45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
/**
|
|
* Race Results View Data
|
|
*
|
|
* ViewData for the race results page template.
|
|
* JSON-serializable, template-ready data structure.
|
|
*/
|
|
|
|
import { ViewData } from "../contracts/view-data/ViewData";
|
|
|
|
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 extends ViewData {
|
|
raceTrack?: string;
|
|
raceScheduledAt?: string;
|
|
totalDrivers?: number;
|
|
leagueName?: string;
|
|
raceSOF: number | null;
|
|
results: RaceResultsResult[];
|
|
penalties: RaceResultsPenalty[];
|
|
pointsSystem: Record<string, number>;
|
|
fastestLapTime: number;
|
|
} |