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