dynamic locations

This commit is contained in:
2026-11-11 14:10:01 +03:30
parent 5e3bd02243
commit 658a8a74cc
18 changed files with 454 additions and 111 deletions
@@ -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;