wip
This commit is contained in:
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[]>;
|
||||
}
|
||||
Reference in New Issue
Block a user