forked from Yara724/api
69 lines
1.5 KiB
TypeScript
69 lines
1.5 KiB
TypeScript
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;
|
|
|
|
@Prop({ type: Types.ObjectId })
|
|
clientId: Types.ObjectId;
|
|
}
|
|
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);
|
|
|