integration tests
This commit is contained in:
64
core/dashboard/application/dto/DashboardDTO.ts
Normal file
64
core/dashboard/application/dto/DashboardDTO.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* 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[];
|
||||
}
|
||||
Reference in New Issue
Block a user