32 lines
757 B
TypeScript
32 lines
757 B
TypeScript
import { ViewModel } from "../contracts/view-models/ViewModel";
|
|
import type { ImportRaceResultsSummaryViewData } from "../view-data/ImportRaceResultsSummaryViewData";
|
|
|
|
export class ImportRaceResultsSummaryViewModel extends ViewModel {
|
|
constructor(private readonly viewData: ImportRaceResultsSummaryViewData) {
|
|
super();
|
|
}
|
|
|
|
get success(): boolean {
|
|
return this.viewData.success;
|
|
}
|
|
|
|
get raceId(): string {
|
|
return this.viewData.raceId;
|
|
}
|
|
|
|
get driversProcessed(): number {
|
|
return this.viewData.driversProcessed;
|
|
}
|
|
|
|
get resultsRecorded(): number {
|
|
return this.viewData.resultsRecorded;
|
|
}
|
|
|
|
get errors(): string[] {
|
|
return this.viewData.errors;
|
|
}
|
|
|
|
get hasErrors(): boolean {
|
|
return this.errors.length > 0;
|
|
}
|
|
} |