// src/clients/dto/list-clients.dto.ts
import { IsOptional, IsString, IsInt, Min, Max } from 'class-validator';
import { Type } from 'class-transformer';

/**
 * Query DTO for GET /clients/paged-clients | /paged-surves | /paged-all
 * Mirrors ListPreviousNcsDto so both modules behave the same way.
 */
export class ListClientsDto {
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  page?: number = 1;

  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  @Max(200)
  limit?: number = 25;

  /** 'All' | 'QRS' | 'TQS' */
  @IsOptional()
  @IsString()
  source?: string = 'All';

  /** 'All' | 'Clients' | 'Surveillance' */
  @IsOptional()
  @IsString()
  type?: string = 'All';

  /** Free text search on company name */
  @IsOptional()
  @IsString()
  search?: string = '';
}
