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

/**
 * DTO for searching campuses of a specific college in a specific country.
 *
 * This DTO is used to filter and fetch campuses of an institute
 * based on the country they are located in.
 */
export class SearchCollegeCampusDto {
  /**
   * The ID of the institute whose campuses are being searched.
   *
   * Validation rules:
   * - Must not be empty
   * - Must be a string
   *
   * Example payload:
   * ```json
   * {
   *   "institute_id": "123"
   * }
   * ```
   */
  @ApiProperty({
    description: 'ID of the institute',
    example: '123',
  })
  @IsNotEmpty({ message: 'institute_id is required' })
  @IsString({ message: 'institute_id must be a string' })
  institute_id: string;

  /**
   * The ID of the country in which the campuses are located.
   *
   * Validation rules:
   * - Must not be empty
   * - Must be a string
   *
   * Example payload:
   * ```json
   * {
   *   "country_id": "80"
   * }
   * ```
   */
  @ApiProperty({
    description: 'ID of the country',
    example: '80',
  })
  @IsNotEmpty({ message: 'country_id is required' })
  @IsString({ message: 'country_id must be a string' })
  country_id: string;
}
