import { IsOptional, IsString, IsEnum, IsInt, Min } from 'class-validator';
import { Type } from 'class-transformer';
import { ClientType } from '@prisma/client';

export class QueryClientDto {
  @IsOptional() @IsString() search?: string;
  @IsOptional() @IsEnum(ClientType) type?: ClientType;
  @IsOptional() @Type(() => Number) @IsInt() @Min(1) page?: number = 1;
  @IsOptional() @Type(() => Number) @IsInt() @Min(1) limit?: number = 20;
}
