blame and claim refactored

This commit is contained in:
2026-02-24 12:19:25 +03:30
parent 0d8858f458
commit 35732dd70a
81 changed files with 11603 additions and 77 deletions

View File

@@ -0,0 +1,65 @@
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Types } from "mongoose";
@Schema({ _id: false })
export class ClaimPlate {
@Prop({ type: Number })
leftDigits?: number;
@Prop({ type: String })
centerAlphabet?: string;
@Prop({ type: Number })
centerDigits?: number;
@Prop({ type: Number })
ir?: number;
@Prop({ type: String })
nationalCode?: string;
}
export const ClaimPlateSchema = SchemaFactory.createForClass(ClaimPlate);
@Schema({ _id: false })
export class ClaimVehicleSnapshot {
@Prop({ type: String })
carName?: string;
@Prop({ type: String })
carModel?: string;
@Prop({ type: String })
carType?: string;
@Prop({ type: Boolean })
isNewCar?: boolean;
@Prop({ type: ClaimPlateSchema })
plate?: ClaimPlate;
}
export const ClaimVehicleSnapshotSchema =
SchemaFactory.createForClass(ClaimVehicleSnapshot);
@Schema({ _id: false })
export class ClaimOwner {
@Prop({ type: Types.ObjectId })
userId?: Types.ObjectId;
@Prop({ type: Types.ObjectId })
userClientKey?: Types.ObjectId;
@Prop({ type: String })
fullName?: string;
}
export const ClaimOwnerSchema = SchemaFactory.createForClass(ClaimOwner);
@Schema({ _id: false })
export class ClaimMoney {
@Prop({ type: String, trim: true })
sheba?: string;
@Prop({ type: String, trim: true })
nationalCodeOfInsurer?: string;
}
export const ClaimMoneySchema = SchemaFactory.createForClass(ClaimMoney);