46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import type { PenaltyType, PenaltyStatus } from '../../domain/entities/Penalty';
|
|
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
|
|
|
export interface RacePenaltyViewModel {
|
|
id: string;
|
|
raceId: string;
|
|
driverId: string;
|
|
driverName: string;
|
|
type: PenaltyType;
|
|
value?: number;
|
|
reason: string;
|
|
protestId?: string;
|
|
issuedBy: string;
|
|
issuedByName: string;
|
|
status: PenaltyStatus;
|
|
description: string;
|
|
issuedAt: string;
|
|
appliedAt?: string;
|
|
notes?: string;
|
|
}
|
|
|
|
export interface RacePenaltiesViewModel {
|
|
penalties: RacePenaltyViewModel[];
|
|
}
|
|
|
|
export interface RacePenaltiesResultDTO {
|
|
penalties: Array<{
|
|
id: string;
|
|
raceId: string;
|
|
driverId: string;
|
|
type: PenaltyType;
|
|
value?: number;
|
|
reason: string;
|
|
protestId?: string;
|
|
issuedBy: string;
|
|
status: PenaltyStatus;
|
|
issuedAt: Date;
|
|
appliedAt?: Date;
|
|
notes?: string;
|
|
getDescription(): string;
|
|
}>;
|
|
driverMap: Map<string, string>;
|
|
}
|
|
|
|
export interface IRacePenaltiesPresenter
|
|
extends Presenter<RacePenaltiesResultDTO, RacePenaltiesViewModel> {} |