/** * Application Port: IResultRepository * * Repository interface for Result entity CRUD operations. * Defines async methods using domain entities as types. */ import { Result } from '../../domain/entities/Result'; export interface IResultRepository { /** * Find a result by ID */ findById(id: string): Promise; /** * Find all results */ findAll(): Promise; /** * Find results by race ID */ findByRaceId(raceId: string): Promise; /** * Find results by driver ID */ findByDriverId(driverId: string): Promise; /** * Find results by driver ID for a specific league */ findByDriverIdAndLeagueId(driverId: string, leagueId: string): Promise; /** * Create a new result */ create(result: Result): Promise; /** * Create multiple results */ createMany(results: Result[]): Promise; /** * Update an existing result */ update(result: Result): Promise; /** * Delete a result by ID */ delete(id: string): Promise; /** * Delete all results for a race */ deleteByRaceId(raceId: string): Promise; /** * Check if a result exists by ID */ exists(id: string): Promise; /** * Check if results exist for a race */ existsByRaceId(raceId: string): Promise; }