forked from Yara724/api
blame and claim refactored
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user