This commit is contained in:
2025-12-04 23:31:55 +01:00
parent 9fa21a488a
commit fb509607c1
96 changed files with 5839 additions and 1609 deletions

View File

@@ -0,0 +1,10 @@
import type { ChampionshipStanding } from '../entities/ChampionshipStanding';
export interface IChampionshipStandingRepository {
findBySeasonAndChampionship(
seasonId: string,
championshipId: string,
): Promise<ChampionshipStanding[]>;
saveAll(standings: ChampionshipStanding[]): Promise<void>;
}

View File

@@ -0,0 +1,6 @@
import type { Game } from '../entities/Game';
export interface IGameRepository {
findById(id: string): Promise<Game | null>;
findAll(): Promise<Game[]>;
}

View File

@@ -0,0 +1,5 @@
import type { LeagueScoringConfig } from '../entities/LeagueScoringConfig';
export interface ILeagueScoringConfigRepository {
findBySeasonId(seasonId: string): Promise<LeagueScoringConfig | null>;
}

View File

@@ -0,0 +1,25 @@
/**
* Application Port: IPenaltyRepository
*
* Repository interface for season-long penalties and bonuses applied
* to drivers within a league. This is intentionally simple for the
* alpha demo and operates purely on in-memory data.
*/
import type { Penalty } from '../entities/Penalty';
export interface IPenaltyRepository {
/**
* Get all penalties for a given league.
*/
findByLeagueId(leagueId: string): Promise<Penalty[]>;
/**
* Get all penalties for a driver in a specific league.
*/
findByLeagueIdAndDriverId(leagueId: string, driverId: string): Promise<Penalty[]>;
/**
* Get all penalties in the system.
*/
findAll(): Promise<Penalty[]>;
}

View File

@@ -0,0 +1,6 @@
import type { Season } from '../entities/Season';
export interface ISeasonRepository {
findById(id: string): Promise<Season | null>;
findByLeagueId(leagueId: string): Promise<Season[]>;
}