fix issues in core

This commit is contained in:
2025-12-23 16:16:12 +01:00
parent 120d3bb1a1
commit d04a21fe02
40 changed files with 280 additions and 841 deletions

View File

@@ -1,7 +1,6 @@
import { Season } from '../../domain/entities/season/Season';
import type { ISeasonRepository } from '../../domain/repositories/ISeasonRepository';
import type { ILeagueRepository } from '../../domain/repositories/ILeagueRepository';
import type { LeagueConfigFormModel } from '../dto/LeagueConfigFormDTO';
import { SeasonSchedule } from '../../domain/value-objects/SeasonSchedule';
import { SeasonScoringConfig } from '../../domain/value-objects/SeasonScoringConfig';
import { SeasonDropPolicy } from '../../domain/value-objects/SeasonDropPolicy';
@@ -21,6 +20,58 @@ import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPo
* Input, result and error models shared across Season-focused use cases.
*/
export type 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 CreateSeasonForLeagueInput {
leagueId: string;
name: string;