19 lines
658 B
TypeScript
19 lines
658 B
TypeScript
/**
|
|
* Repository Interface: IPrizeRepository
|
|
*
|
|
* Defines operations for Prize entity persistence
|
|
*/
|
|
|
|
import type { Prize, PrizeStatus } from '../entities/Prize';
|
|
|
|
export interface IPrizeRepository {
|
|
findById(id: string): Promise<Prize | null>;
|
|
findBySeasonId(seasonId: string): Promise<Prize[]>;
|
|
findByDriverId(driverId: string): Promise<Prize[]>;
|
|
findByStatus(status: PrizeStatus): Promise<Prize[]>;
|
|
findBySeasonAndPosition(seasonId: string, position: number): Promise<Prize | null>;
|
|
create(prize: Prize): Promise<Prize>;
|
|
update(prize: Prize): Promise<Prize>;
|
|
delete(id: string): Promise<void>;
|
|
exists(id: string): Promise<boolean>;
|
|
} |