1
0
forked from Yara724/api

YARA-1034

This commit is contained in:
SepehrYahyaee
2026-06-20 14:30:29 +03:30
parent 15fcb011aa
commit 2e4b10455b
7 changed files with 28 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ type FieldExpertSeed = {
city?: string;
state?: string;
title?: string;
expertCode?: string;
};
function stripQuotes(value: string): string {
@@ -172,6 +173,7 @@ const FieldExpertSchema = new Schema(
phone: { type: String },
role: { type: String, default: "field_expert" },
otp: { type: String, default: "" },
expertCode: { type: String, required: false },
},
{ collection: "field-expert", versionKey: false, timestamps: true },
);
@@ -273,6 +275,7 @@ async function main() {
mobile: expert.mobile,
role: "field_expert",
otp: "",
expertCode: expert.expertCode,
};
const existing = await FieldExpert.findOne({