forked from Yara724/api
76 lines
1.2 KiB
TypeScript
76 lines
1.2 KiB
TypeScript
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
|
import { Degrees } from "src/Types&Enums/degrees.enum";
|
|
import { RoleEnum } from "src/Types&Enums/role.enum";
|
|
import { UserType } from "src/Types&Enums/userType.enum";
|
|
|
|
@Schema({ collection: "expert", versionKey: false, timestamps: true })
|
|
export class ExpertModel {
|
|
@Prop({})
|
|
firstName: string;
|
|
|
|
@Prop({})
|
|
role: RoleEnum;
|
|
|
|
@Prop({})
|
|
userType: UserType;
|
|
|
|
@Prop({})
|
|
lastName: string;
|
|
|
|
@Prop({ unique: true })
|
|
nationalCode: string;
|
|
|
|
@Prop({ type: "string", unique: true })
|
|
email: string;
|
|
|
|
@Prop({})
|
|
password: string;
|
|
|
|
@Prop({})
|
|
sheba: string;
|
|
|
|
@Prop({})
|
|
phone: string;
|
|
|
|
@Prop({})
|
|
mobile: string;
|
|
|
|
@Prop({})
|
|
city: string;
|
|
|
|
@Prop({})
|
|
state: string;
|
|
|
|
@Prop({})
|
|
address: string;
|
|
|
|
@Prop({ type: String })
|
|
expDegree: Degrees;
|
|
|
|
@Prop({})
|
|
insuActivityTime?: number;
|
|
|
|
@Prop({})
|
|
insuActivityCo?: string;
|
|
|
|
@Prop({})
|
|
policeActivityTime?: number;
|
|
|
|
@Prop({})
|
|
policeActivityKind?: string;
|
|
|
|
@Prop({})
|
|
policeServicePlace?: string;
|
|
|
|
@Prop({})
|
|
clientKey?: string;
|
|
|
|
@Prop({ type: "string" })
|
|
otp: string;
|
|
|
|
|
|
createdAt: Date;
|
|
}
|
|
|
|
export const ExpertDbSchema = SchemaFactory.createForClass(ExpertModel);
|