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

/**
 * DTO for searching countries associated with a specific product and associate type.
 *
 * This DTO is typically used to filter or fetch all countries where a product
 * is applicable for a given associate type.
 */
export class SearchProductCountriesDto {
  /**
   * The ID of the product to filter countries for.
   *
   * Required field:
   * - Must be a non-empty string.
   * - Example: "PROD001"
   */
  @ApiProperty()
  @IsNotEmpty()
  @IsString()
  product_id: string;

  /**
   * Type of associate to filter countries for.
   *
   * Required field:
   * - Must be a non-empty string.
   * - Example: "INSTITUTE" or "SUB_AGENT"
   */
  @ApiProperty()
  @IsNotEmpty()
  @IsString()
  associate_type: string;
}
