/** * Repository Interface: IUserRatingRepository * * Defines operations for UserRating value objects */ import type { UserRating } from '../value-objects/UserRating'; export interface IUserRatingRepository { /** * Find rating by user ID */ findByUserId(userId: string): Promise; /** * Find ratings by multiple user IDs */ findByUserIds(userIds: string[]): Promise; /** * Save or update a user rating */ save(rating: UserRating): Promise; /** * Get top rated drivers */ getTopDrivers(limit: number): Promise; /** * Get top trusted users */ getTopTrusted(limit: number): Promise; /** * Get eligible stewards (based on trust and fairness thresholds) */ getEligibleStewards(): Promise; /** * Get ratings by driver tier */ findByDriverTier(tier: 'rookie' | 'amateur' | 'semi-pro' | 'pro' | 'elite'): Promise; /** * Delete rating by user ID */ delete(userId: string): Promise; }