import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional } from 'class-validator';

/**
 * DTO used to search and filter commission instances
 * based on multiple optional criteria.
 *
 * Each field is optional and can be combined to narrow down
 * the search results for commission configurations.
 */
export class SearchCommissionInstancesDto {
  /**
   * Visa service country ID.
   *
   * Optional field used to filter commission instances
   * related to a specific visa service country.
   */
  @ApiProperty()
  @IsNumber()
  @IsOptional()
  visa_service_country_id: number;

  /**
   * Institute ID.
   *
   * Optional field used to filter commission instances
   * linked to a particular institute.
   */
  @ApiProperty()
  @IsNumber()
  @IsOptional()
  institute_id: number;

  /**
   * Client originating country ID.
   *
   * Optional field used to filter commission instances
   * for clients coming from a specific country.
   */
  @ApiProperty()
  @IsNumber()
  @IsOptional()
  client_from_country_id: number;

  /**
   * Intake ID.
   *
   * Optional field used to filter commission instances
   * for a specific intake period.
   */
  @ApiProperty()
  @IsNumber()
  @IsOptional()
  intake_id: number;
}
