52 lines
953 B
TypeScript
52 lines
953 B
TypeScript
/**
|
|
* Race Stewarding View Data
|
|
*
|
|
* ViewData for the race stewarding page template.
|
|
* JSON-serializable, template-ready data structure.
|
|
*/
|
|
|
|
export interface Protest {
|
|
id: string;
|
|
protestingDriverId: string;
|
|
accusedDriverId: string;
|
|
incident: {
|
|
lap: number;
|
|
description: string;
|
|
};
|
|
filedAt: string;
|
|
status: string;
|
|
proofVideoUrl?: string;
|
|
decisionNotes?: string;
|
|
}
|
|
|
|
export interface Penalty {
|
|
id: string;
|
|
driverId: string;
|
|
type: string;
|
|
value: number;
|
|
reason: string;
|
|
notes?: string;
|
|
}
|
|
|
|
export interface Driver {
|
|
id: string;
|
|
name: string;
|
|
}
|
|
|
|
export interface RaceStewardingViewData {
|
|
race?: {
|
|
id: string;
|
|
track: string;
|
|
scheduledAt: string;
|
|
} | null;
|
|
league?: {
|
|
id: string;
|
|
} | null;
|
|
pendingProtests: Protest[];
|
|
resolvedProtests: Protest[];
|
|
penalties: Penalty[];
|
|
driverMap: Record<string, Driver>;
|
|
pendingCount: number;
|
|
resolvedCount: number;
|
|
penaltiesCount: number;
|
|
} |