refactor
This commit is contained in:
40
core/payments/application/presenters/IGetWalletPresenter.ts
Normal file
40
core/payments/application/presenters/IGetWalletPresenter.ts
Normal 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> {}
|
||||
Reference in New Issue
Block a user