This commit is contained in:
2025-12-16 10:50:15 +01:00
parent 775d41e055
commit 8ed6ba1fd1
144 changed files with 5763 additions and 1985 deletions

View File

@@ -0,0 +1,21 @@
/**
* Repository Interface: IMembershipFeeRepository
*/
import type { MembershipFee } from '../entities/MembershipFee';
import type { MemberPayment } from '../entities/MemberPayment';
export interface IMembershipFeeRepository {
findById(id: string): Promise<MembershipFee | null>;
findByLeagueId(leagueId: string): Promise<MembershipFee | null>;
create(fee: MembershipFee): Promise<MembershipFee>;
update(fee: MembershipFee): Promise<MembershipFee>;
}
export interface IMemberPaymentRepository {
findById(id: string): Promise<MemberPayment | null>;
findByFeeIdAndDriverId(feeId: string, driverId: string): Promise<MemberPayment | null>;
findByLeagueIdAndDriverId(leagueId: string, driverId: string, membershipFeeRepo: IMembershipFeeRepository): Promise<MemberPayment[]>;
create(payment: MemberPayment): Promise<MemberPayment>;
update(payment: MemberPayment): Promise<MemberPayment>;
}

View File

@@ -0,0 +1,15 @@
/**
* Repository Interface: IPaymentRepository
*/
import type { Payment, PaymentType } from '../entities/Payment';
export interface IPaymentRepository {
findById(id: string): Promise<Payment | null>;
findByLeagueId(leagueId: string): Promise<Payment[]>;
findByPayerId(payerId: string): Promise<Payment[]>;
findByType(type: PaymentType): Promise<Payment[]>;
findByFilters(filters: { leagueId?: string; payerId?: string; type?: PaymentType }): Promise<Payment[]>;
create(payment: Payment): Promise<Payment>;
update(payment: Payment): Promise<Payment>;
}

View File

@@ -0,0 +1,15 @@
/**
* Repository Interface: IPrizeRepository
*/
import type { Prize } from '../entities/Prize';
export interface IPrizeRepository {
findById(id: string): Promise<Prize | null>;
findByLeagueId(leagueId: string): Promise<Prize[]>;
findByLeagueIdAndSeasonId(leagueId: string, seasonId: string): Promise<Prize[]>;
findByPosition(leagueId: string, seasonId: string, position: number): Promise<Prize | null>;
create(prize: Prize): Promise<Prize>;
update(prize: Prize): Promise<Prize>;
delete(id: string): Promise<void>;
}

View File

@@ -0,0 +1,18 @@
/**
* Repository Interface: IWalletRepository
*/
import type { Wallet, Transaction } from '../entities/Wallet';
export interface IWalletRepository {
findById(id: string): Promise<Wallet | null>;
findByLeagueId(leagueId: string): Promise<Wallet | null>;
create(wallet: Wallet): Promise<Wallet>;
update(wallet: Wallet): Promise<Wallet>;
}
export interface ITransactionRepository {
findById(id: string): Promise<Transaction | null>;
findByWalletId(walletId: string): Promise<Transaction[]>;
create(transaction: Transaction): Promise<Transaction>;
}

View File

@@ -0,0 +1,4 @@
export * from './IPaymentRepository';
export * from './IMembershipFeeRepository';
export * from './IPrizeRepository';
export * from './IWalletRepository';