import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString } from 'class-validator';

/**
 * DTO used to search or filter institutes based on optional criteria.
 *
 * Currently supports filtering by the country in which the institute is located.
 * Can be extended in the future to include additional search filters like
 * institute name, type, or region.
 */
export class SearchInstitutesDto {
  /**
   * Country identifier to filter institutes.
   *
   * Optional field:
   * - When provided, returns only institutes located in the specified country
   * - When omitted, returns institutes across all countries
   *
   * Note:
   * - Expected to be a string representing the country ID or code
   * - Can be used in combination with other filters if added in the future
   */
  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  country_id?: string;
}
