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,16 @@
/**
* Presenter Interface: IAwardPrizePresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PrizeDto } from './IGetPrizesPresenter';
export interface AwardPrizeResultDTO {
prize: PrizeDto;
}
export interface AwardPrizeViewModel {
prize: PrizeDto;
}
export interface IAwardPrizePresenter extends Presenter<AwardPrizeResultDTO, AwardPrizeViewModel> {}

View File

@@ -0,0 +1,16 @@
/**
* Presenter Interface: ICreatePaymentPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PaymentDto } from './IGetPaymentsPresenter';
export interface CreatePaymentResultDTO {
payment: PaymentDto;
}
export interface CreatePaymentViewModel {
payment: PaymentDto;
}
export interface ICreatePaymentPresenter extends Presenter<CreatePaymentResultDTO, CreatePaymentViewModel> {}

View File

@@ -0,0 +1,16 @@
/**
* Presenter Interface: ICreatePrizePresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PrizeDto } from './IGetPrizesPresenter';
export interface CreatePrizeResultDTO {
prize: PrizeDto;
}
export interface CreatePrizeViewModel {
prize: PrizeDto;
}
export interface ICreatePrizePresenter extends Presenter<CreatePrizeResultDTO, CreatePrizeViewModel> {}

View File

@@ -0,0 +1,15 @@
/**
* Presenter Interface: IDeletePrizePresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
export interface DeletePrizeResultDTO {
success: boolean;
}
export interface DeletePrizeViewModel {
success: boolean;
}
export interface IDeletePrizePresenter extends Presenter<DeletePrizeResultDTO, DeletePrizeViewModel> {}

View File

@@ -0,0 +1,42 @@
/**
* Presenter Interface: IGetMembershipFeesPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { MembershipFeeType } from '../../domain/entities/MembershipFee';
import type { MemberPaymentStatus } from '../../domain/entities/MemberPayment';
export interface MembershipFeeDto {
id: string;
leagueId: string;
seasonId?: string;
type: MembershipFeeType;
amount: number;
enabled: boolean;
createdAt: Date;
updatedAt: Date;
}
export interface MemberPaymentDto {
id: string;
feeId: string;
driverId: string;
amount: number;
platformFee: number;
netAmount: number;
status: MemberPaymentStatus;
dueDate: Date;
paidAt?: Date;
}
export interface GetMembershipFeesResultDTO {
fee: MembershipFeeDto | null;
payments: MemberPaymentDto[];
}
export interface GetMembershipFeesViewModel {
fee: MembershipFeeDto | null;
payments: MemberPaymentDto[];
}
export interface IGetMembershipFeesPresenter extends Presenter<GetMembershipFeesResultDTO, GetMembershipFeesViewModel> {}

View File

@@ -0,0 +1,31 @@
/**
* Presenter Interface: IGetPaymentsPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PaymentType, PayerType, PaymentStatus } from '../../domain/entities/Payment';
export interface PaymentDto {
id: string;
type: PaymentType;
amount: number;
platformFee: number;
netAmount: number;
payerId: string;
payerType: PayerType;
leagueId: string;
seasonId?: string;
status: PaymentStatus;
createdAt: Date;
completedAt?: Date;
}
export interface GetPaymentsResultDTO {
payments: PaymentDto[];
}
export interface GetPaymentsViewModel {
payments: PaymentDto[];
}
export interface IGetPaymentsPresenter extends Presenter<GetPaymentsResultDTO, GetPaymentsViewModel> {}

View File

@@ -0,0 +1,31 @@
/**
* Presenter Interface: IGetPrizesPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PrizeType } from '../../domain/entities/Prize';
export interface PrizeDto {
id: string;
leagueId: string;
seasonId: string;
position: number;
name: string;
amount: number;
type: PrizeType;
description?: string;
awarded: boolean;
awardedTo?: string;
awardedAt?: Date;
createdAt: Date;
}
export interface GetPrizesResultDTO {
prizes: PrizeDto[];
}
export interface GetPrizesViewModel {
prizes: PrizeDto[];
}
export interface IGetPrizesPresenter extends Presenter<GetPrizesResultDTO, GetPrizesViewModel> {}

View File

@@ -0,0 +1,40 @@
/**
* Presenter Interface: IGetWalletPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { TransactionType, ReferenceType } from '../../domain/entities/Wallet';
export interface WalletDto {
id: string;
leagueId: string;
balance: number;
totalRevenue: number;
totalPlatformFees: number;
totalWithdrawn: number;
currency: string;
createdAt: Date;
}
export interface TransactionDto {
id: string;
walletId: string;
type: TransactionType;
amount: number;
description: string;
referenceId?: string;
referenceType?: ReferenceType;
createdAt: Date;
}
export interface GetWalletResultDTO {
wallet: WalletDto;
transactions: TransactionDto[];
}
export interface GetWalletViewModel {
wallet: WalletDto;
transactions: TransactionDto[];
}
export interface IGetWalletPresenter extends Presenter<GetWalletResultDTO, GetWalletViewModel> {}

View File

@@ -0,0 +1,18 @@
/**
* Presenter Interface: IProcessWalletTransactionPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { WalletDto, TransactionDto } from './IGetWalletPresenter';
export interface ProcessWalletTransactionResultDTO {
wallet: WalletDto;
transaction: TransactionDto;
}
export interface ProcessWalletTransactionViewModel {
wallet: WalletDto;
transaction: TransactionDto;
}
export interface IProcessWalletTransactionPresenter extends Presenter<ProcessWalletTransactionResultDTO, ProcessWalletTransactionViewModel> {}

View File

@@ -0,0 +1,16 @@
/**
* Presenter Interface: IUpdateMemberPaymentPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { MemberPaymentDto } from './IGetMembershipFeesPresenter';
export interface UpdateMemberPaymentResultDTO {
payment: MemberPaymentDto;
}
export interface UpdateMemberPaymentViewModel {
payment: MemberPaymentDto;
}
export interface IUpdateMemberPaymentPresenter extends Presenter<UpdateMemberPaymentResultDTO, UpdateMemberPaymentViewModel> {}

View File

@@ -0,0 +1,16 @@
/**
* Presenter Interface: IUpdatePaymentStatusPresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { PaymentDto } from './IGetPaymentsPresenter';
export interface UpdatePaymentStatusResultDTO {
payment: PaymentDto;
}
export interface UpdatePaymentStatusViewModel {
payment: PaymentDto;
}
export interface IUpdatePaymentStatusPresenter extends Presenter<UpdatePaymentStatusResultDTO, UpdatePaymentStatusViewModel> {}

View File

@@ -0,0 +1,16 @@
/**
* Presenter Interface: IUpsertMembershipFeePresenter
*/
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
import type { MembershipFeeDto } from './IGetMembershipFeesPresenter';
export interface UpsertMembershipFeeResultDTO {
fee: MembershipFeeDto;
}
export interface UpsertMembershipFeeViewModel {
fee: MembershipFeeDto;
}
export interface IUpsertMembershipFeePresenter extends Presenter<UpsertMembershipFeeResultDTO, UpsertMembershipFeeViewModel> {}

View File

@@ -0,0 +1,12 @@
export * from './IGetPaymentsPresenter';
export * from './ICreatePaymentPresenter';
export * from './IUpdatePaymentStatusPresenter';
export * from './IGetMembershipFeesPresenter';
export * from './IUpsertMembershipFeePresenter';
export * from './IUpdateMemberPaymentPresenter';
export * from './IGetPrizesPresenter';
export * from './ICreatePrizePresenter';
export * from './IAwardPrizePresenter';
export * from './IDeletePrizePresenter';
export * from './IGetWalletPresenter';
export * from './IProcessWalletTransactionPresenter';