25 lines
685 B
TypeScript
25 lines
685 B
TypeScript
/**
|
|
* 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[]>;
|
|
} |