1
0
forked from Yara724/api
Files
yara724-api/src/users/entities/schema/insurer-expert.schema.ts
SepehrYahyaee af875a4773 YARA-913
2026-05-24 10:10:17 +03:30

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);