website cleanup
This commit is contained in:
29
apps/website/lib/view-models/LeagueScoringConfigViewModel.ts
Normal file
29
apps/website/lib/view-models/LeagueScoringConfigViewModel.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { LeagueScoringConfigDTO } from '@/lib/types/generated/LeagueScoringConfigDTO';
|
||||
|
||||
/**
|
||||
* LeagueScoringConfigViewModel
|
||||
*
|
||||
* View model for league scoring configuration
|
||||
*/
|
||||
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;
|
||||
}>;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user