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

export class CreateStateDto {
  @ApiProperty({
    description: "The name of the state",
    example: "Gujarat",
  })
  @IsString({ message: "State name must be a string." })
  @IsNotEmpty({ message: "State name cannot be empty." })
  name: string

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