12 lines
517 B
TypeScript
12 lines
517 B
TypeScript
import { RewardSummary } from '../aggregates/reward-summary/reward-summary.aggregate';
|
|
|
|
export interface IRewardSummaryRepository {
|
|
save(summary: RewardSummary): Promise<void>;
|
|
findByUserId(userId: bigint): Promise<RewardSummary | null>;
|
|
getOrCreate(userId: bigint): Promise<RewardSummary>;
|
|
findByUserIds(userIds: bigint[]): Promise<Map<string, RewardSummary>>;
|
|
findTopSettleableUsers(limit: number): Promise<RewardSummary[]>;
|
|
}
|
|
|
|
export const REWARD_SUMMARY_REPOSITORY = Symbol('IRewardSummaryRepository');
|