import { IsInt, IsOptional, IsString } from "class-validator"
import { ApiProperty } from "@nestjs/swagger"

export class ClientsCompaniesFilterDto {
  @ApiProperty({
    description: "Search by company name, client type, or phone number",
    example: "Acme",
    required: false,
  })
  @IsOptional()
  @IsString()
  search?: string

  @ApiProperty({
    description: "Limit",
    example: 10,
    required: false,
  })
  @IsOptional()
  @IsInt()
  limit?: number

  @ApiProperty({
    description: "Skip",
    example: 0,
    required: false,
  })
  @IsOptional()
  @IsInt()
  skip?: number

  @ApiProperty({
    description: "Country ID to filter by country",
    example: 91,
    required: false,
  })
  @IsOptional()
  @IsInt()
  country_id?: number

  @ApiProperty({
    description: "Client Type ID to filter by client type",
    example: 3,
    required: false,
  })
  @IsOptional()
  @IsInt()
  client_type_id?: number

  @ApiProperty({
    description: "Indicates whether the user is a medical patients.",
    required: false,
    enum: ["true", "false"],
  })
  @IsOptional()
  is_medical_patient?: string
}
