website cleanup
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { LeagueScoringChampionshipDTO } from '@/lib/types/generated/LeagueScoringChampionshipDTO';
|
||||
|
||||
/**
|
||||
* LeagueScoringChampionshipViewModel
|
||||
*
|
||||
* View model for league scoring championship
|
||||
*/
|
||||
export class LeagueScoringChampionshipViewModel {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly type: string;
|
||||
readonly sessionTypes: string[];
|
||||
readonly pointsPreview: Array<{ sessionType: string; position: number; points: number }>;
|
||||
readonly bonusSummary: string[];
|
||||
readonly dropPolicyDescription?: string;
|
||||
|
||||
constructor(dto: LeagueScoringChampionshipDTO) {
|
||||
this.id = dto.id;
|
||||
this.name = dto.name;
|
||||
this.type = dto.type;
|
||||
this.sessionTypes = dto.sessionTypes;
|
||||
this.pointsPreview = (dto.pointsPreview as any) || [];
|
||||
this.bonusSummary = (dto as any).bonusSummary || [];
|
||||
this.dropPolicyDescription = (dto as any).dropPolicyDescription;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user