/** * Repository Interface: IPenaltyRepository * * Defines the contract for persisting and retrieving Penalty entities. */ import type { Penalty } from '../entities/Penalty'; export interface IPenaltyRepository { /** * Find a penalty by ID */ findById(id: string): Promise; /** * Find all penalties for a race */ findByRaceId(raceId: string): Promise; /** * Find all penalties for a specific driver */ findByDriverId(driverId: string): Promise; /** * Find all penalties related to a specific protest */ findByProtestId(protestId: string): Promise; /** * Find all pending penalties (not yet applied) */ findPending(): Promise; /** * Find all penalties issued by a specific steward */ findIssuedBy(stewardId: string): Promise; /** * Save a new penalty */ create(penalty: Penalty): Promise; /** * Update an existing penalty */ update(penalty: Penalty): Promise; /** * Check if a penalty exists */ exists(id: string): Promise; }