61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
export type LeagueStructureMode = 'solo' | 'fixedTeams';
|
|
|
|
export interface LeagueStructureFormDTO {
|
|
mode: LeagueStructureMode;
|
|
maxDrivers: number;
|
|
maxTeams?: number;
|
|
driversPerTeam?: number;
|
|
multiClassEnabled?: boolean;
|
|
}
|
|
|
|
export interface LeagueChampionshipsFormDTO {
|
|
enableDriverChampionship: boolean;
|
|
enableTeamChampionship: boolean;
|
|
enableNationsChampionship: boolean;
|
|
enableTrophyChampionship: boolean;
|
|
}
|
|
|
|
export interface LeagueScoringFormDTO {
|
|
patternId?: string; // e.g. 'sprint-main-driver', 'club-ladder-solo'
|
|
// For now, keep customScoring optional and simple:
|
|
customScoringEnabled?: boolean;
|
|
}
|
|
|
|
export interface LeagueDropPolicyFormDTO {
|
|
strategy: 'none' | 'bestNResults' | 'dropWorstN';
|
|
n?: number;
|
|
}
|
|
|
|
export interface LeagueTimingsFormDTO {
|
|
practiceMinutes?: number;
|
|
qualifyingMinutes: number;
|
|
sprintRaceMinutes?: number;
|
|
mainRaceMinutes: number;
|
|
sessionCount: number;
|
|
roundsPlanned?: number;
|
|
|
|
seasonStartDate?: string; // ISO date YYYY-MM-DD
|
|
seasonEndDate?: string; // ISO date YYYY-MM-DD
|
|
raceStartTime?: string; // "HH:MM" 24h
|
|
timezoneId?: string; // IANA ID, e.g. "Europe/Berlin", or "track" for track local time
|
|
recurrenceStrategy?: 'weekly' | 'everyNWeeks' | 'monthlyNthWeekday';
|
|
intervalWeeks?: number;
|
|
weekdays?: import('../../domain/value-objects/Weekday').Weekday[];
|
|
monthlyOrdinal?: 1 | 2 | 3 | 4;
|
|
monthlyWeekday?: import('../../domain/value-objects/Weekday').Weekday;
|
|
}
|
|
|
|
export interface LeagueConfigFormModel {
|
|
leagueId?: string; // present for admin, omitted for create
|
|
basics: {
|
|
name: string;
|
|
description?: string;
|
|
visibility: 'public' | 'private';
|
|
gameId: string;
|
|
};
|
|
structure: LeagueStructureFormDTO;
|
|
championships: LeagueChampionshipsFormDTO;
|
|
scoring: LeagueScoringFormDTO;
|
|
dropPolicy: LeagueDropPolicyFormDTO;
|
|
timings: LeagueTimingsFormDTO;
|
|
} |