forked from Yara724/api
blame and claim refactored
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
||||
import { CarDamagePartModel, CarDamagePartOtherModel } from "./car-parts.schema";
|
||||
|
||||
@Schema({ _id: false })
|
||||
export class ClaimDamageSelection {
|
||||
/**
|
||||
* V2: Array of selected damaged outer car part names
|
||||
* Examples: ['hood', 'front_right_door', 'rear_bumper']
|
||||
*/
|
||||
@Prop({ type: [String], default: [] })
|
||||
selectedParts?: string[];
|
||||
|
||||
/**
|
||||
* V2: Array of selected other (non-body) damaged parts
|
||||
* Examples: ['engine', 'suspension', 'headlight']
|
||||
*/
|
||||
@Prop({ type: [String], default: [] })
|
||||
otherParts?: string[];
|
||||
|
||||
/**
|
||||
* Legacy fields - kept for backward compatibility
|
||||
*/
|
||||
@Prop({ type: [CarDamagePartModel] })
|
||||
legacyParts?: CarDamagePartModel[];
|
||||
|
||||
@Prop({ type: CarDamagePartOtherModel })
|
||||
legacyOtherParts?: CarDamagePartOtherModel;
|
||||
}
|
||||
export const ClaimDamageSelectionSchema =
|
||||
SchemaFactory.createForClass(ClaimDamageSelection);
|
||||
|
||||
Reference in New Issue
Block a user