forked from Yara724/api
dynamic locations
This commit is contained in:
@@ -4,6 +4,18 @@ 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({ _id: false, versionKey: false })
|
||||
export class ExpertLocationModel {
|
||||
@Prop({ type: String, required: true })
|
||||
id: string;
|
||||
|
||||
@Prop({ type: String, required: true })
|
||||
name: string;
|
||||
}
|
||||
|
||||
export const ExpertLocationDbSchema =
|
||||
SchemaFactory.createForClass(ExpertLocationModel);
|
||||
|
||||
@Schema({ collection: "expert", versionKey: false, timestamps: true })
|
||||
export class ExpertModel {
|
||||
@Prop({})
|
||||
@@ -69,6 +81,9 @@ export class ExpertModel {
|
||||
@Prop({ type: Types.ObjectId, index: true })
|
||||
branchId?: Types.ObjectId;
|
||||
|
||||
@Prop({ type: [ExpertLocationDbSchema], default: [] })
|
||||
locations?: ExpertLocationModel[];
|
||||
|
||||
@Prop({ type: "string" })
|
||||
otp: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user