65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
/**
|
|
* Dashboard DTO (Data Transfer Object)
|
|
*
|
|
* Represents the complete dashboard data structure returned to the client.
|
|
*/
|
|
|
|
/**
|
|
* Driver statistics section
|
|
*/
|
|
export interface DriverStatisticsDTO {
|
|
rating: number;
|
|
rank: number;
|
|
starts: number;
|
|
wins: number;
|
|
podiums: number;
|
|
leagues: number;
|
|
}
|
|
|
|
/**
|
|
* Upcoming race section
|
|
*/
|
|
export interface UpcomingRaceDTO {
|
|
trackName: string;
|
|
carType: string;
|
|
scheduledDate: string;
|
|
timeUntilRace: string;
|
|
}
|
|
|
|
/**
|
|
* Championship standing section
|
|
*/
|
|
export interface ChampionshipStandingDTO {
|
|
leagueName: string;
|
|
position: number;
|
|
points: number;
|
|
totalDrivers: number;
|
|
}
|
|
|
|
/**
|
|
* Recent activity section
|
|
*/
|
|
export interface RecentActivityDTO {
|
|
type: 'race_result' | 'league_invitation' | 'achievement' | 'other';
|
|
description: string;
|
|
timestamp: string;
|
|
status: 'success' | 'info' | 'warning' | 'error';
|
|
}
|
|
|
|
/**
|
|
* Dashboard DTO
|
|
*
|
|
* Complete dashboard data structure for a driver.
|
|
*/
|
|
export interface DashboardDTO {
|
|
driver: {
|
|
id: string;
|
|
name: string;
|
|
avatar?: string;
|
|
};
|
|
statistics: DriverStatisticsDTO;
|
|
upcomingRaces: UpcomingRaceDTO[];
|
|
championshipStandings: ChampionshipStandingDTO[];
|
|
recentActivity: RecentActivityDTO[];
|
|
}
|