Implemented CAR_BODY fanavaran inquiry

This commit is contained in:
SepehrYahyaee
2026-09-06 14:11:32 +03:30
parent 4d2501d90c
commit ef9768795d
8 changed files with 470 additions and 64 deletions

View File

@@ -79,14 +79,44 @@ export class Insurance {
@Prop({ type: [String] })
coverages?: string[];
/** CAR_BODY only: mocked car-body insurance inquiry result */
/** CAR_BODY inquiry result; raw provider data is retained in vehicle.inquiry.carBody.raw. */
@Prop({ type: MongooseSchema.Types.Mixed })
carBodyInsurance?: {
policyNumber?: string;
policyId?: number;
contractId?: number;
startDate?: string;
endDate?: string;
insurerCompany?: string;
coverages?: string[];
companyId?: number | string;
companyName?: string;
insurerName?: string;
insurerNationalCode?: string;
ownerNationalCode?: string;
ownerName?: string;
customerName?: string;
customerLastName?: string;
customerFatherName?: string;
customerMobile?: string;
customerAddress?: string;
customerPostalCode?: string;
chassisNumber?: string;
vin?: string;
motorNumber?: string;
vehicleGroup?: string;
vehicleSystem?: string;
vehicleKind?: string;
builtYear?: number;
cylinderCount?: number;
passengerCount?: number;
usage?: string;
issueDate?: string;
vehicleValue?: number;
totalPremium?: number;
noLossYearsCount?: number;
lossDocuments?: unknown[];
hasEndorsement?: boolean;
};
}
export const InsuranceSchema = SchemaFactory.createForClass(Insurance);
@@ -183,4 +213,4 @@ export class Party {
@Prop({ type: PartyConfirmationSchema })
confirmation?: PartyConfirmation;
}
export const PartySchema = SchemaFactory.createForClass(Party);
export const PartySchema = SchemaFactory.createForClass(Party);

View File

@@ -1,5 +1,5 @@
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Types } from "mongoose";
import { Schema as MongooseSchema, Types } from "mongoose";
import {
ResendFirstPartyDto,
ResendSecondPartyDto,
@@ -79,6 +79,13 @@ export class CarBodyInsuranceDetail {
@Prop({ type: [String] })
coverages?: string[];
/** Complete provider payload, retained for audit and future field mapping. */
@Prop({ type: MongooseSchema.Types.Mixed })
raw?: unknown;
@Prop()
source?: string;
}
export class SecondPartyFile {