daghi problem fixed , 2 apis for reporting counts added

This commit is contained in:
2026-04-21 16:43:15 +03:30
parent a3156881b8
commit 75b7e5ecad
6 changed files with 144 additions and 4 deletions

View File

@@ -12,8 +12,12 @@ export class ClaimPartPricing {
@Prop({ type: String })
partId: string;
@Prop({ type: String })
carPartDamage?: string;
/**
* Legacy string or structured `{ part, side }` from expert reply DTOs (V1/V2).
* Must be Mixed — objects cannot cast to String.
*/
@Prop({ type: MongooseSchema.Types.Mixed })
carPartDamage?: string | { part?: string; side?: string };
@Prop({ type: String })
typeOfDamage?: string;
@@ -27,8 +31,9 @@ export class ClaimPartPricing {
@Prop({ type: MongooseSchema.Types.Mixed })
totalPayment?: string | number;
/** V1/V2: string/number legacy, or `{ option, price?, branchId? }` after expert normalization. */
@Prop({ type: MongooseSchema.Types.Mixed })
daghi?: string | number;
daghi?: string | number | Record<string, unknown>;
@Prop({ type: Boolean, default: false })
factorNeeded?: boolean;