This commit is contained in:
2025-12-04 11:54:42 +01:00
parent 9d5caa87f3
commit b7d5551ea7
223 changed files with 5473 additions and 885 deletions

View File

@@ -0,0 +1,45 @@
/**
* Application Port: IRaceRegistrationRepository
*
* Repository interface for race registration operations.
* This defines the persistence boundary for RaceRegistration entities.
*/
import type { RaceRegistration } from '../entities/RaceRegistration';
export interface IRaceRegistrationRepository {
/**
* Check if a driver is registered for a race.
*/
isRegistered(raceId: string, driverId: string): Promise<boolean>;
/**
* Get all registered driver IDs for a race.
*/
getRegisteredDrivers(raceId: string): Promise<string[]>;
/**
* Get the number of registrations for a race.
*/
getRegistrationCount(raceId: string): Promise<number>;
/**
* Register a driver for a race.
*/
register(registration: RaceRegistration): Promise<void>;
/**
* Withdraw a driver from a race.
*/
withdraw(raceId: string, driverId: string): Promise<void>;
/**
* Get all race IDs a driver is registered for.
*/
getDriverRegistrations(driverId: string): Promise<string[]>;
/**
* Clear all registrations for a race (e.g., when race is cancelled).
*/
clearRaceRegistrations(raceId: string): Promise<void>;
}