import { ApiProperty } from '@nestjs/swagger'; import { IsDate, IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'; import { PayerType } from './PayerType'; import { PaymentStatus } from './PaymentStatus'; import { PaymentType } from './PaymentType'; export class PaymentDTO { @ApiProperty() @IsString() id!: string; @ApiProperty({ enum: PaymentType }) @IsEnum(PaymentType) type!: PaymentType; @ApiProperty() @IsNumber() amount!: number; @ApiProperty() @IsNumber() platformFee!: number; @ApiProperty() @IsNumber() netAmount!: number; @ApiProperty() @IsString() payerId!: string; @ApiProperty({ enum: PayerType }) @IsEnum(PayerType) payerType!: PayerType; @ApiProperty() @IsString() leagueId!: string; @ApiProperty({ required: false }) @IsOptional() @IsString() seasonId?: string; @ApiProperty({ enum: PaymentStatus }) @IsEnum(PaymentStatus) status!: PaymentStatus; @ApiProperty() @IsDate() createdAt!: Date; @ApiProperty({ required: false }) @IsOptional() @IsDate() completedAt?: Date; }