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

export class CreateCityDto {
  @ApiProperty({
    description: "The name of the city",
    example: "New York",
  })
  @IsString({ message: "City name must be a string." })
  @IsNotEmpty({ message: "City name cannot be empty." })
  name: string

  @ApiProperty({
    description: "The ID of the state the city belongs to",
    example: 1,
  })
  @IsInt({ message: "State ID must be an integer." })
  @IsNotEmpty({ message: "State ID cannot be empty." })
  state_id: number

  @ApiProperty({
    description: "The ID of the country the city belongs to",
    example: 1,
  })
  @IsInt({ message: "Country ID must be an integer." })
  @IsNotEmpty({ message: "Country ID cannot be empty." })
  country_id: number
}
