import { ApiProperty } from "@nestjs/swagger"
import { Type } from "class-transformer"
import { IsInt, IsNotEmpty, ValidateNested } from "class-validator"
import { CreateEscortDto } from "./create-escort.dto"

export class UpsertEscortDto {
  @ApiProperty({ example: 1 })
  @IsInt()
  @IsNotEmpty()
  customer_id: number

  @ApiProperty({ type: [CreateEscortDto] })
  @ValidateNested({ each: true })
  @Type(() => CreateEscortDto)
  escorts: CreateEscortDto[]
}
