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

/**
 * DTO to fetch details of multiple countries based on their IDs.
 *
 * This DTO expects an array of country identifiers and ensures
 * that at least one country ID is provided.
 */
export class CountriesDetailsByIdsDto {
  /**
   * Array of country IDs for which details are to be fetched.
   * Required field.
   * Example: ["IN", "US", "AU"]
   */
  @ApiProperty()
  @IsNotEmpty({ message: 'Countries array cannot be empty' })
  @IsArray({ message: 'Countries must be an array of strings' })
  countries: string[];
}
