refactor payments module

This commit is contained in:
2025-12-22 17:52:59 +01:00
parent 0828506c21
commit c90b2166c1
28 changed files with 524 additions and 268 deletions

View File

@@ -7,35 +7,35 @@ import { PaymentStatus } from './PaymentStatus';
export class PaymentDTO {
@ApiProperty()
@IsString()
id: string;
id!: string;
@ApiProperty({ enum: PaymentType })
@IsEnum(PaymentType)
type: PaymentType;
type!: PaymentType;
@ApiProperty()
@IsNumber()
amount: number;
amount!: number;
@ApiProperty()
@IsNumber()
platformFee: number;
platformFee!: number;
@ApiProperty()
@IsNumber()
netAmount: number;
netAmount!: number;
@ApiProperty()
@IsString()
payerId: string;
payerId!: string;
@ApiProperty({ enum: PayerType })
@IsEnum(PayerType)
payerType: PayerType;
payerType!: PayerType;
@ApiProperty()
@IsString()
leagueId: string;
leagueId!: string;
@ApiProperty({ required: false })
@IsOptional()
@@ -44,11 +44,11 @@ export class PaymentDTO {
@ApiProperty({ enum: PaymentStatus })
@IsEnum(PaymentStatus)
status: PaymentStatus;
status!: PaymentStatus;
@ApiProperty()
@IsDate()
createdAt: Date;
createdAt!: Date;
@ApiProperty({ required: false })
@IsOptional()