Files
yara724api/src/users/entities/schema/insurer-expert.schema.ts
SepehrYahyaee d9509c5df5 YARA-718
2026-01-19 17:48:06 +03:30

48 lines
753 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;
createdAt: Date;
}
export const InsurerExpertDbSchema =
SchemaFactory.createForClass(InsurerExpertModel);