wip
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
6
packages/racing/domain/repositories/IGameRepository.ts
Normal file
6
packages/racing/domain/repositories/IGameRepository.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { Game } from '../entities/Game';
|
||||
|
||||
export interface IGameRepository {
|
||||
findById(id: string): Promise<Game | null>;
|
||||
findAll(): Promise<Game[]>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { LeagueScoringConfig } from '../entities/LeagueScoringConfig';
|
||||
|
||||
export interface ILeagueScoringConfigRepository {
|
||||
findBySeasonId(seasonId: string): Promise<LeagueScoringConfig | null>;
|
||||
}
|
||||
25
packages/racing/domain/repositories/IPenaltyRepository.ts
Normal file
25
packages/racing/domain/repositories/IPenaltyRepository.ts
Normal 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[]>;
|
||||
}
|
||||
6
packages/racing/domain/repositories/ISeasonRepository.ts
Normal file
6
packages/racing/domain/repositories/ISeasonRepository.ts
Normal 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[]>;
|
||||
}
|
||||
Reference in New Issue
Block a user