forked from Yara724/api
YARA-833
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user