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

export class CreateAddOnDto {
  @ApiProperty({ description: "Name of the add-on" })
  @IsNotEmpty()
  @IsString()
  name: string

  @ApiProperty({ description: "Description of the add-on", required: false })
  @IsOptional()
  @IsString()
  description?: string

  @ApiProperty({
    description: "Array of vehicle model IDs this add-on is associated with",
    type: [Number],
  })
  @IsArray()
  @ArrayNotEmpty()
  @IsNumber({}, { each: true })
  vehicle_model_ids: number[]
}
