1
0
forked from Yara724/api
This commit is contained in:
SepehrYahyaee
2026-04-27 17:03:29 +03:30
parent c2f996cc28
commit e90f8dc33c
5 changed files with 288 additions and 28 deletions

View File

@@ -1,6 +1,20 @@
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { CarDamagePartModel, CarDamagePartOtherModel } from "./car-parts.schema";
@Schema({ _id: false })
export class SelectedOuterPartV2 {
@Prop({ type: Number })
id: number;
@Prop({ type: String })
key: string;
@Prop({ type: String })
side: string;
}
export const SelectedOuterPartV2Schema =
SchemaFactory.createForClass(SelectedOuterPartV2);
@Schema({ _id: false })
export class ClaimDamageSelection {
/**
@@ -10,6 +24,10 @@ export class ClaimDamageSelection {
@Prop({ type: [String], default: [] })
selectedParts?: string[];
/** Structured selected outer parts with id + side for better downstream handling. */
@Prop({ type: [SelectedOuterPartV2Schema], default: [] })
selectedOuterParts?: SelectedOuterPartV2[];
/**
* V2: Array of selected other (non-body) damaged parts
* Examples: ['engine', 'suspension', 'headlight']