forked from Yara724/api
54 lines
859 B
TypeScript
54 lines
859 B
TypeScript
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
|
import { Types } from "mongoose";
|
|
import { RoleEnum } from "src/Types&Enums/role.enum";
|
|
|
|
@Schema({
|
|
collection: "insurer-expert",
|
|
versionKey: false,
|
|
timestamps: true,
|
|
})
|
|
export class InsurerExpertModel {
|
|
@Prop()
|
|
firstName: string;
|
|
|
|
@Prop()
|
|
lastName: string;
|
|
|
|
@Prop({ unique: true, required: true })
|
|
email: string;
|
|
|
|
@Prop()
|
|
password: string;
|
|
|
|
@Prop()
|
|
role: RoleEnum;
|
|
|
|
@Prop()
|
|
clientKey: Types.ObjectId;
|
|
|
|
@Prop()
|
|
phone?: string;
|
|
|
|
@Prop()
|
|
mobile?: string;
|
|
|
|
@Prop()
|
|
city?: string;
|
|
|
|
@Prop()
|
|
state?: string;
|
|
|
|
@Prop()
|
|
address?: string;
|
|
|
|
@Prop({ default: null })
|
|
captcha?: string | null;
|
|
|
|
@Prop({ default: 0 })
|
|
captchaExpire?: number;
|
|
|
|
createdAt: Date;
|
|
}
|
|
export const InsurerExpertDbSchema =
|
|
SchemaFactory.createForClass(InsurerExpertModel);
|