/** * 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; /** * Get all registered driver IDs for a race. */ getRegisteredDrivers(raceId: string): Promise; /** * Get the number of registrations for a race. */ getRegistrationCount(raceId: string): Promise; /** * Register a driver for a race. */ register(registration: RaceRegistration): Promise; /** * Withdraw a driver from a race. */ withdraw(raceId: string, driverId: string): Promise; /** * Get all race IDs a driver is registered for. */ getDriverRegistrations(driverId: string): Promise; /** * Clear all registrations for a race (e.g., when race is cancelled). */ clearRaceRegistrations(raceId: string): Promise; }