website refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { LeagueScoringConfigDTO } from '@/lib/types/generated/LeagueScoringConfigDTO';
|
||||
import type { LeagueScoringChampionshipDTO } from '@/lib/types/generated/LeagueScoringChampionshipDTO';
|
||||
|
||||
/**
|
||||
* LeagueScoringConfigViewModel
|
||||
@@ -9,21 +10,12 @@ export class LeagueScoringConfigViewModel {
|
||||
readonly gameName: string;
|
||||
readonly scoringPresetName?: string;
|
||||
readonly dropPolicySummary?: string;
|
||||
readonly championships?: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'driver' | 'team' | 'nations' | 'trophy' | string;
|
||||
sessionTypes: string[];
|
||||
pointsPreview: Array<{ sessionType: string; position: number; points: number }>;
|
||||
bonusSummary: string[];
|
||||
dropPolicyDescription?: string;
|
||||
}>;
|
||||
readonly championships?: LeagueScoringChampionshipDTO[];
|
||||
|
||||
constructor(dto: LeagueScoringConfigDTO) {
|
||||
this.gameName = dto.gameName;
|
||||
// These would be mapped from extended properties if available
|
||||
this.scoringPresetName = (dto as any).scoringPresetName;
|
||||
this.dropPolicySummary = (dto as any).dropPolicySummary;
|
||||
this.championships = (dto as any).championships;
|
||||
this.scoringPresetName = dto.scoringPresetName;
|
||||
this.dropPolicySummary = dto.dropPolicySummary;
|
||||
this.championships = dto.championships;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user