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

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;
}