rename to core
This commit is contained in:
60
core/racing/application/presenters/IRaceDetailPresenter.ts
Normal file
60
core/racing/application/presenters/IRaceDetailPresenter.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import type { SessionType, RaceStatus } from '../../domain/entities/Race';
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
|
||||
export interface RaceDetailEntryViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
rating: number | null;
|
||||
isCurrentUser: boolean;
|
||||
}
|
||||
|
||||
export interface RaceDetailUserResultViewModel {
|
||||
position: number;
|
||||
startPosition: number;
|
||||
incidents: number;
|
||||
fastestLap: number;
|
||||
positionChange: number;
|
||||
isPodium: boolean;
|
||||
isClean: boolean;
|
||||
ratingChange: number | null;
|
||||
}
|
||||
|
||||
export interface RaceDetailRaceViewModel {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
sessionType: SessionType;
|
||||
status: RaceStatus;
|
||||
strengthOfField: number | null;
|
||||
registeredCount?: number;
|
||||
maxParticipants?: number;
|
||||
}
|
||||
|
||||
export interface RaceDetailLeagueViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
settings: {
|
||||
maxDrivers?: number;
|
||||
qualifyingFormat?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface RaceDetailViewModel {
|
||||
race: RaceDetailRaceViewModel | null;
|
||||
league: RaceDetailLeagueViewModel | null;
|
||||
entryList: RaceDetailEntryViewModel[];
|
||||
registration: {
|
||||
isUserRegistered: boolean;
|
||||
canRegister: boolean;
|
||||
};
|
||||
userResult: RaceDetailUserResultViewModel | null;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface IRaceDetailPresenter
|
||||
extends Presenter<RaceDetailViewModel, RaceDetailViewModel> {}
|
||||
Reference in New Issue
Block a user