import {
  IsNotEmpty,
  IsString,
  IsOptional,
  IsNumber,
  Min,
  Max,
} from "class-validator"
import { ApiProperty } from "@nestjs/swagger"

export class CreateVehicleModelDto {
  @ApiProperty({ description: "Name of the vehicle model" })
  @IsNotEmpty()
  @IsString()
  name: string

  @ApiProperty({ description: "ID of the vehicle manufacturer" })
  @IsNotEmpty()
  @IsNumber()
  vehicle_manufacture_id: number

  @ApiProperty({ description: "ID of the vehicle type" })
  @IsNotEmpty()
  @IsNumber()
  vehicle_type_id: number

  @ApiProperty({
    description: "Status of the vehicle model (1 for active, 0 for inactive)",
    default: 1,
  })
  @IsOptional()
  @IsNumber()
  @Min(0)
  @Max(1)
  status?: number

  @ApiProperty({
    description: "Capacity of the passengers",
  })
  @IsOptional()
  capacity?: string
}
