import { ApiProperty } from '@nestjs/swagger';
import { IsEnum, IsNumber, IsString, IsOptional } from 'class-validator';
import { PaymentType } from './PaymentType';
import { PayerType } from './PayerType';

export class CreatePaymentInputDTO {
  @ApiProperty({ enum: PaymentType })
  @IsEnum(PaymentType)
  type!: PaymentType;

  @ApiProperty()
  @IsNumber()
  amount!: number;

  @ApiProperty()
  @IsString()
  payerId!: string;

  @ApiProperty({ enum: PayerType })
  @IsEnum(PayerType)
  payerType!: PayerType;

  @ApiProperty()
  @IsString()
  leagueId!: string;

  @ApiProperty({ required: false })
  @IsOptional()
  @IsString()
  seasonId?: string;
}