import { ApiPropertyOptional } from "@nestjs/swagger"; import { ArrayMaxSize, IsArray, IsEnum, IsOptional, } from "class-validator"; import { OtherCarPart } from "./select-other-parts-v2.dto"; /** * V3 in-person expert flow: other parts only (sheba/national code collected during run-inquiries). */ export class SelectOtherPartsV3Dto { @ApiPropertyOptional({ description: "Array of selected other damaged parts (non-body parts)", example: ["engine", "suspension", "headlight"], enum: OtherCarPart, isArray: true, maxItems: 11, }) @IsOptional() @IsArray({ message: "otherParts must be an array" }) @ArrayMaxSize(11, { message: "Maximum 11 other parts can be selected" }) @IsEnum(OtherCarPart, { each: true, message: "Invalid part name. Must be one of the valid other car parts", }) otherParts?: OtherCarPart[]; }