import { IsNotEmpty, IsArray, IsUUID, ArrayMinSize } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class AssignPaymentMethodDto {
  @ApiProperty({ example: 'UUID', required: true })
  @IsNotEmpty({ message: 'Country ID is required.' })
  @IsUUID(undefined, { message: 'Country ID is invalid.' })
  country_id: string;

  @ApiProperty({ example: ['UUID1', 'UUID2'], required: true, type: [String] })
  @IsArray({ message: 'Payment method IDs must be an array.' })
  @ArrayMinSize(1, { message: 'At least one payment method ID is required.' })
  @IsUUID(undefined, { each: true, message: 'Each payment method ID must be a valid UUID.' })
  payment_method_ids: string[];
}
