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

/**
 * DTO for searching campuses of a college in a specific country.
 *
 * This DTO is typically used to fetch the list of campuses for:
 * 1. A given institute/college
 * 2. A specific country
 */
export class SearchCollegeCampusDto {
  /**
   * ID of the institute/college (required)
   *
   * Validation:
   * - Must be a non-empty string
   *
   * Example: "101"
   */
  @ApiProperty({
    description: 'ID of the institute/college',
    example: '101',
  })
  @IsNotEmpty({ message: 'Institute ID is required' })
  @IsString({ message: 'Institute ID must be a string' })
  institute_id: string;

  /**
   * ID of the country to filter campuses (required)
   *
   * Validation:
   * - Must be a non-empty string
   *
   * Example: "IN" (India)
   */
  @ApiProperty({
    description: 'ID of the country where the campus is located',
    example: 'IN',
  })
  @IsNotEmpty({ message: 'Country ID is required' })
  @IsString({ message: 'Country ID must be a string' })
  country_id: string;
}
