integration tests
Some checks failed
CI / lint-typecheck (pull_request) Failing after 4m51s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
Some checks failed
CI / lint-typecheck (pull_request) Failing after 4m51s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
This commit is contained in:
34
core/rating/ports/RatingRepository.ts
Normal file
34
core/rating/ports/RatingRepository.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* RatingRepository Port
|
||||
*
|
||||
* Defines the interface for rating persistence operations.
|
||||
*/
|
||||
|
||||
import { Rating } from '../domain/Rating';
|
||||
|
||||
export interface RatingRepository {
|
||||
/**
|
||||
* Save a rating
|
||||
*/
|
||||
save(rating: Rating): Promise<void>;
|
||||
|
||||
/**
|
||||
* Find rating by driver and race
|
||||
*/
|
||||
findByDriverAndRace(driverId: string, raceId: string): Promise<Rating | null>;
|
||||
|
||||
/**
|
||||
* Find all ratings for a driver
|
||||
*/
|
||||
findByDriver(driverId: string): Promise<Rating[]>;
|
||||
|
||||
/**
|
||||
* Find all ratings for a race
|
||||
*/
|
||||
findByRace(raceId: string): Promise<Rating[]>;
|
||||
|
||||
/**
|
||||
* Clear all ratings
|
||||
*/
|
||||
clear(): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user