34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
export type LeagueScoringChampionshipViewModelInput = {
|
|
id: string;
|
|
name: string;
|
|
type: string;
|
|
sessionTypes: string[];
|
|
pointsPreview?: Array<{ sessionType: string; position: number; points: number }> | null;
|
|
bonusSummary?: string[] | null;
|
|
dropPolicyDescription?: string;
|
|
};
|
|
|
|
/**
|
|
* 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(input: LeagueScoringChampionshipViewModelInput) {
|
|
this.id = input.id;
|
|
this.name = input.name;
|
|
this.type = input.type;
|
|
this.sessionTypes = input.sessionTypes;
|
|
this.pointsPreview = input.pointsPreview ?? [];
|
|
this.bonusSummary = input.bonusSummary ?? [];
|
|
this.dropPolicyDescription = input.dropPolicyDescription;
|
|
}
|
|
} |