forked from Yara724/api
update some important issues
This commit is contained in:
@@ -87,8 +87,9 @@ export class ClaimExpertReply {
|
||||
export const ClaimExpertReplySchema =
|
||||
SchemaFactory.createForClass(ClaimExpertReply);
|
||||
|
||||
/** One line item the user disputes on an expert-priced part */
|
||||
@Schema({ _id: false })
|
||||
export class ClaimUserObjection {
|
||||
export class ClaimUserObjectionPart {
|
||||
@Prop({ type: String, required: true })
|
||||
partId: string;
|
||||
|
||||
@@ -103,9 +104,47 @@ export class ClaimUserObjection {
|
||||
|
||||
@Prop({ type: String })
|
||||
typeOfDamage?: string;
|
||||
|
||||
@Prop({ type: String })
|
||||
carPartDamage?: string;
|
||||
|
||||
@Prop({ type: String })
|
||||
side?: string;
|
||||
}
|
||||
export const ClaimUserObjectionSchema =
|
||||
SchemaFactory.createForClass(ClaimUserObjection);
|
||||
export const ClaimUserObjectionPartSchema =
|
||||
SchemaFactory.createForClass(ClaimUserObjectionPart);
|
||||
|
||||
@Schema({ _id: false })
|
||||
export class ClaimUserObjectionNewPart {
|
||||
@Prop({ type: String })
|
||||
partId?: string;
|
||||
|
||||
@Prop({ type: String, required: true })
|
||||
partName: string;
|
||||
|
||||
@Prop({ type: String })
|
||||
side?: string;
|
||||
}
|
||||
export const ClaimUserObjectionNewPartSchema =
|
||||
SchemaFactory.createForClass(ClaimUserObjectionNewPart);
|
||||
|
||||
/**
|
||||
* Full user objection payload (matches v1 DTO: objectionParts + newParts).
|
||||
* Stored on {@link ClaimEvaluation.objection}.
|
||||
*/
|
||||
@Schema({ _id: false })
|
||||
export class ClaimUserObjectionPayload {
|
||||
@Prop({ type: [ClaimUserObjectionPartSchema], default: [] })
|
||||
objectionParts?: ClaimUserObjectionPart[];
|
||||
|
||||
@Prop({ type: [ClaimUserObjectionNewPartSchema], default: [] })
|
||||
newParts?: ClaimUserObjectionNewPart[];
|
||||
|
||||
@Prop({ type: Date, default: () => new Date() })
|
||||
submittedAt?: Date;
|
||||
}
|
||||
export const ClaimUserObjectionPayloadSchema =
|
||||
SchemaFactory.createForClass(ClaimUserObjectionPayload);
|
||||
|
||||
@Schema({ _id: false })
|
||||
export class ClaimResendRequest {
|
||||
@@ -182,8 +221,8 @@ export class ClaimEvaluation {
|
||||
@Prop({ type: ClaimResendRequestSchema })
|
||||
damageExpertResend?: ClaimResendRequest | null;
|
||||
|
||||
@Prop({ type: ClaimUserObjectionSchema })
|
||||
objection?: ClaimUserObjection;
|
||||
@Prop({ type: ClaimUserObjectionPayloadSchema })
|
||||
objection?: ClaimUserObjectionPayload;
|
||||
|
||||
@Prop({ type: ClaimUserResendPayloadSchema })
|
||||
userResendDocuments?: ClaimUserResendPayload;
|
||||
|
||||
Reference in New Issue
Block a user