Files
gridpilot.gg/core/racing/application/presenters/IAllRacesPagePresenter.ts
2025-12-16 11:52:26 +01:00

29 lines
853 B
TypeScript

import type { Presenter } from '@core/shared/presentation';
export type AllRacesStatus = 'scheduled' | 'running' | 'completed' | 'cancelled' | 'all';
export interface AllRacesListItemViewModel {
id: string;
track: string;
car: string;
scheduledAt: string;
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
leagueId: string;
leagueName: string;
strengthOfField: number | null;
}
export interface AllRacesFilterOptionsViewModel {
statuses: { value: AllRacesStatus; label: string }[];
leagues: { id: string; name: string }[];
}
export interface AllRacesPageViewModel {
races: AllRacesListItemViewModel[];
filters: AllRacesFilterOptionsViewModel;
}
export type AllRacesPageResultDTO = AllRacesPageViewModel;
export interface IAllRacesPagePresenter
extends Presenter<AllRacesPageResultDTO, AllRacesPageViewModel> {}