fix data flow issues

This commit is contained in:
2025-12-19 21:58:03 +01:00
parent 94fc538f44
commit ec177a75ce
37 changed files with 1336 additions and 534 deletions

View File

@@ -0,0 +1,59 @@
import { ApiProperty } from '@nestjs/swagger';
export class WalletTransactionDTO {
@ApiProperty()
id: string;
@ApiProperty({ enum: ['sponsorship', 'membership', 'withdrawal', 'prize'] })
type: 'sponsorship' | 'membership' | 'withdrawal' | 'prize';
@ApiProperty()
description: string;
@ApiProperty()
amount: number;
@ApiProperty()
fee: number;
@ApiProperty()
netAmount: number;
@ApiProperty()
date: string;
@ApiProperty({ enum: ['completed', 'pending', 'failed'] })
status: 'completed' | 'pending' | 'failed';
@ApiProperty({ required: false })
reference?: string;
}
export class GetLeagueWalletOutputDTO {
@ApiProperty()
balance: number;
@ApiProperty()
currency: string;
@ApiProperty()
totalRevenue: number;
@ApiProperty()
totalFees: number;
@ApiProperty()
totalWithdrawals: number;
@ApiProperty()
pendingPayouts: number;
@ApiProperty()
canWithdraw: boolean;
@ApiProperty({ required: false })
withdrawalBlockReason?: string;
@ApiProperty({ type: [WalletTransactionDTO] })
transactions: WalletTransactionDTO[];
}

View File

@@ -0,0 +1,15 @@
import { ApiProperty } from '@nestjs/swagger';
export class WithdrawFromLeagueWalletInputDTO {
@ApiProperty()
amount: number;
@ApiProperty()
currency: string;
@ApiProperty()
seasonId: string;
@ApiProperty()
destinationAccount: string;
}

View File

@@ -0,0 +1,9 @@
import { ApiProperty } from '@nestjs/swagger';
export class WithdrawFromLeagueWalletOutputDTO {
@ApiProperty()
success: boolean;
@ApiProperty({ required: false })
message?: string;
}