view models
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// TODO: Create ImportRaceResultsSummaryDTO in apps/website/lib/types/generated when available
|
||||
interface ImportRaceResultsSummaryDTO {
|
||||
raceId: string;
|
||||
importedCount: number;
|
||||
errors: string[];
|
||||
}
|
||||
|
||||
export class ImportRaceResultsSummaryViewModel implements ImportRaceResultsSummaryDTO {
|
||||
raceId: string;
|
||||
importedCount: number;
|
||||
errors: string[];
|
||||
|
||||
constructor(dto: ImportRaceResultsSummaryDTO) {
|
||||
this.raceId = dto.raceId;
|
||||
this.importedCount = dto.importedCount;
|
||||
this.errors = dto.errors;
|
||||
}
|
||||
|
||||
// TODO: Add additional UI-specific fields when DTO is available
|
||||
}
|
||||
Reference in New Issue
Block a user