Files
gridpilot.gg/apps/website/lib/view-models/RaceDetailEntryViewModel.ts
2026-01-23 15:30:23 +01:00

18 lines
677 B
TypeScript

import { ViewModel } from "../contracts/view-models/ViewModel";
import type { RaceDetailEntryViewData } from "../view-data/RaceDetailEntryViewData";
export class RaceDetailEntryViewModel extends ViewModel {
private readonly data: RaceDetailEntryViewData;
constructor(data: RaceDetailEntryViewData) {
super();
this.data = data;
}
get id(): string { return this.data.id; }
get name(): string { return this.data.name; }
get country(): string { return this.data.country; }
get avatarUrl(): string { return this.data.avatarUrl; }
get isCurrentUser(): boolean { return this.data.isCurrentUser; }
get rating(): number | null { return this.data.rating; }
}