/** * Application Port: ICarRepository * * Repository interface for Car entity CRUD operations. * Defines async methods using domain entities as types. */ import type { Car, CarClass, CarLicense } from '../entities/Car'; export interface ICarRepository { /** * Find a car by ID */ findById(id: string): Promise; /** * Find all cars */ findAll(): Promise; /** * Find cars by game ID */ findByGameId(gameId: string): Promise; /** * Find cars by class */ findByClass(carClass: CarClass): Promise; /** * Find cars by license level */ findByLicense(license: CarLicense): Promise; /** * Find cars by manufacturer */ findByManufacturer(manufacturer: string): Promise; /** * Search cars by name */ searchByName(query: string): Promise; /** * Create a new car */ create(car: Car): Promise; /** * Update an existing car */ update(car: Car): Promise; /** * Delete a car by ID */ delete(id: string): Promise; /** * Check if a car exists by ID */ exists(id: string): Promise; }