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

/**
 * DTO used to search for commission received records
 * based on specific filters related to visa cases.
 *
 * All fields are required to ensure accurate retrieval
 * of commission data.
 */
export class SearchCommissionReceivedDto {
  /** Visa service country ID for filtering records */
  @ApiProperty()
  @IsNotEmpty()
  visa_service_country_id: number;

  /** Client originating country ID */
  @ApiProperty()
  @IsNotEmpty()
  client_from_country_id: number;

  /** Institute ID */
  @ApiProperty()
  @IsNotEmpty()
  institute_id: number;

  /** Intake ID */
  @ApiProperty()
  @IsNotEmpty()
  intake_id: number;

  /** Applicable-on configuration ID */
  @ApiProperty()
  @IsNotEmpty()
  applicable_on_id: number;

  /** Contract set ID */
  @ApiProperty()
  @IsNotEmpty()
  contract_set_id: number;

  /** Commission instance ID */
  @ApiProperty()
  @IsNotEmpty()
  commission_instance: number;

  /** Array of visa case IDs to filter commission records */
  @ApiProperty()
  @IsNotEmpty()
  @IsArray()
  visa_case_id: number[];
}
