fix issues in core
This commit is contained in:
93
core/racing/application/dto/LeagueConfigFormDTO.ts
Normal file
93
core/racing/application/dto/LeagueConfigFormDTO.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
export interface LeagueConfigFormModel {
|
||||
basics?: {
|
||||
name?: string;
|
||||
description?: string;
|
||||
visibility?: string;
|
||||
gameId?: string;
|
||||
};
|
||||
structure?: {
|
||||
mode?: string;
|
||||
maxDrivers?: number;
|
||||
};
|
||||
championships?: {
|
||||
enableDriverChampionship?: boolean;
|
||||
enableTeamChampionship?: boolean;
|
||||
enableNationsChampionship?: boolean;
|
||||
enableTrophyChampionship?: boolean;
|
||||
};
|
||||
scoring?: {
|
||||
patternId?: string;
|
||||
customScoringEnabled?: boolean;
|
||||
};
|
||||
dropPolicy?: {
|
||||
strategy?: string;
|
||||
n?: number;
|
||||
};
|
||||
timings?: {
|
||||
qualifyingMinutes?: number;
|
||||
mainRaceMinutes?: number;
|
||||
sessionCount?: number;
|
||||
roundsPlanned?: number;
|
||||
seasonStartDate?: string;
|
||||
raceStartTime?: string;
|
||||
timezoneId?: string;
|
||||
recurrenceStrategy?: string;
|
||||
weekdays?: string[];
|
||||
intervalWeeks?: number;
|
||||
monthlyOrdinal?: number;
|
||||
monthlyWeekday?: string;
|
||||
};
|
||||
stewarding?: {
|
||||
decisionMode?: string;
|
||||
requiredVotes?: number;
|
||||
requireDefense?: boolean;
|
||||
defenseTimeLimit?: number;
|
||||
voteTimeLimit?: number;
|
||||
protestDeadlineHours?: number;
|
||||
stewardingClosesHours?: number;
|
||||
notifyAccusedOnProtest?: boolean;
|
||||
notifyOnVoteRequired?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface LeagueStructureFormDTO {
|
||||
name: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
}
|
||||
|
||||
export interface LeagueChampionshipsFormDTO {
|
||||
pointsSystem: string;
|
||||
customPoints?: Record<number, number>;
|
||||
}
|
||||
|
||||
export interface LeagueScoringFormDTO {
|
||||
pointsSystem: string;
|
||||
customPoints?: Record<number, number>;
|
||||
}
|
||||
|
||||
export interface LeagueDropPolicyFormDTO {
|
||||
dropWeeks?: number;
|
||||
bestResults?: number;
|
||||
}
|
||||
|
||||
export interface LeagueStructureMode {
|
||||
mode: 'simple' | 'advanced';
|
||||
}
|
||||
|
||||
export interface LeagueTimingsFormDTO {
|
||||
sessionDuration?: number;
|
||||
qualifyingFormat?: string;
|
||||
}
|
||||
|
||||
export interface LeagueStewardingFormDTO {
|
||||
decisionMode: string;
|
||||
requiredVotes?: number;
|
||||
requireDefense?: boolean;
|
||||
defenseTimeLimit?: number;
|
||||
voteTimeLimit?: number;
|
||||
protestDeadlineHours?: number;
|
||||
stewardingClosesHours?: number;
|
||||
notifyAccusedOnProtest?: boolean;
|
||||
notifyOnVoteRequired?: boolean;
|
||||
}
|
||||
30
core/racing/application/dto/LeagueDTO.ts
Normal file
30
core/racing/application/dto/LeagueDTO.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
export interface LeagueDTO {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
settings: {
|
||||
pointsSystem: string;
|
||||
sessionDuration?: number;
|
||||
qualifyingFormat?: string;
|
||||
customPoints?: Record<number, number>;
|
||||
maxDrivers?: number;
|
||||
stewarding?: {
|
||||
decisionMode: string;
|
||||
requiredVotes?: number;
|
||||
requireDefense?: boolean;
|
||||
defenseTimeLimit?: number;
|
||||
voteTimeLimit?: number;
|
||||
protestDeadlineHours?: number;
|
||||
stewardingClosesHours?: number;
|
||||
notifyAccusedOnProtest?: boolean;
|
||||
notifyOnVoteRequired?: boolean;
|
||||
};
|
||||
};
|
||||
createdAt: Date;
|
||||
socialLinks?: {
|
||||
discordUrl?: string;
|
||||
youtubeUrl?: string;
|
||||
websiteUrl?: string;
|
||||
};
|
||||
}
|
||||
11
core/racing/application/dto/LeagueDriverSeasonStatsDTO.ts
Normal file
11
core/racing/application/dto/LeagueDriverSeasonStatsDTO.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface LeagueDriverSeasonStatsDTO {
|
||||
driverId: string;
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
totalPoints: number;
|
||||
averagePoints: number;
|
||||
bestFinish: number;
|
||||
podiums: number;
|
||||
races: number;
|
||||
wins: number;
|
||||
}
|
||||
21
core/racing/application/dto/LeagueScheduleDTO.ts
Normal file
21
core/racing/application/dto/LeagueScheduleDTO.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export interface LeagueScheduleDTO {
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
races: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
scheduledTime: Date;
|
||||
trackId: string;
|
||||
status: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface LeagueSchedulePreviewDTO {
|
||||
leagueId: string;
|
||||
preview: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
scheduledTime: Date;
|
||||
trackId: string;
|
||||
}>;
|
||||
}
|
||||
9
core/racing/application/dto/RaceDTO.ts
Normal file
9
core/racing/application/dto/RaceDTO.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface RaceDTO {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
name: string;
|
||||
scheduledTime: Date;
|
||||
trackId: string;
|
||||
status: 'scheduled' | 'in_progress' | 'completed' | 'cancelled';
|
||||
results?: string[];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface ReopenRaceCommandDTO {
|
||||
raceId: string;
|
||||
}
|
||||
9
core/racing/application/dto/ResultDTO.ts
Normal file
9
core/racing/application/dto/ResultDTO.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface ResultDTO {
|
||||
id: string;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
points: number;
|
||||
time?: string;
|
||||
incidents?: number;
|
||||
}
|
||||
10
core/racing/application/dto/StandingDTO.ts
Normal file
10
core/racing/application/dto/StandingDTO.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface StandingDTO {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
points: number;
|
||||
races: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
}
|
||||
7
core/racing/application/dto/index.ts
Normal file
7
core/racing/application/dto/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export * from './LeagueConfigFormDTO';
|
||||
export * from './LeagueDTO';
|
||||
export * from './LeagueDriverSeasonStatsDTO';
|
||||
export * from './LeagueScheduleDTO';
|
||||
export * from './RaceDTO';
|
||||
export * from './ResultDTO';
|
||||
export * from './StandingDTO';
|
||||
Reference in New Issue
Block a user