|
|
@ -206,6 +206,75 @@ const installationschema = new mongoose.Schema({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const supportschema = new mongoose.Schema({
|
|
|
|
|
|
|
|
// name: { type: String },
|
|
|
|
|
|
|
|
phone: { type: String, unique: true, trim: true },
|
|
|
|
|
|
|
|
address: String,
|
|
|
|
|
|
|
|
supportId: { type: String },
|
|
|
|
|
|
|
|
phoneVerified: { type: Boolean, default: false },
|
|
|
|
|
|
|
|
phoneVerificationCode: { type: Number, default: 11111 },
|
|
|
|
|
|
|
|
passwordResetCode: { type: Number},
|
|
|
|
|
|
|
|
oneTimePasswordSetFlag: { type: Boolean, default: false },
|
|
|
|
|
|
|
|
emails: [{ email: String, verified: { type: Boolean, default: false } }],
|
|
|
|
|
|
|
|
services: { password: { bcrypt: String } },
|
|
|
|
|
|
|
|
alternativeNumber: { type: String, default: null },
|
|
|
|
|
|
|
|
firstName: { type: String, default: null },
|
|
|
|
|
|
|
|
lastName: { type: String, default: null },
|
|
|
|
|
|
|
|
address1: { type: String, default: null },
|
|
|
|
|
|
|
|
address2: { type: String, default: null },
|
|
|
|
|
|
|
|
city: { type: String, default: null },
|
|
|
|
|
|
|
|
designation: { type: String, default: null },
|
|
|
|
|
|
|
|
reportingManager: { type: String, default: null },
|
|
|
|
|
|
|
|
departmentName: { type: String, default: null },
|
|
|
|
|
|
|
|
zone: { type: String, default: null },
|
|
|
|
|
|
|
|
type: { type: String },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
profile: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state: { type: String, default: null },
|
|
|
|
|
|
|
|
country: { type: String, default: null },
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
team : { type: String, default: null},
|
|
|
|
|
|
|
|
manager : { type: String, default: null},
|
|
|
|
|
|
|
|
team_member: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
team_member: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
support_teamMemberId: { type: String },
|
|
|
|
|
|
|
|
name: { type: String },
|
|
|
|
|
|
|
|
phone: { type: String },
|
|
|
|
|
|
|
|
installationTeamMemId: { type: String },
|
|
|
|
|
|
|
|
password: { type: String, default: null },
|
|
|
|
|
|
|
|
status: { type: String, default: "active" },
|
|
|
|
|
|
|
|
email: { type: String },
|
|
|
|
|
|
|
|
alternativePhone: { type: String },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
longitude: { type : Number,default: 0.0},
|
|
|
|
|
|
|
|
latitude: {type: Number,default: 0.0},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fcmId: { type: String, default: null },
|
|
|
|
|
|
|
|
createdAt: {
|
|
|
|
|
|
|
|
type: Date,
|
|
|
|
|
|
|
|
default: function () {
|
|
|
|
|
|
|
|
return Date.now();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
createdBy: ObjectId,
|
|
|
|
|
|
|
|
updatedAt: {
|
|
|
|
|
|
|
|
type: Date,
|
|
|
|
|
|
|
|
default: function () {
|
|
|
|
|
|
|
|
return Date.now();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
updatedBy: ObjectId,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const storeSchema = new mongoose.Schema({
|
|
|
|
const storeSchema = new mongoose.Schema({
|
|
|
|
storename: { type: String },
|
|
|
|
storename: { type: String },
|
|
|
@ -785,6 +854,7 @@ const Iotprice = mongoose.model('Iotprice', iotpriceSchema);
|
|
|
|
const SensorStock = mongoose.model("SensorStock", SensorStockSchema);
|
|
|
|
const SensorStock = mongoose.model("SensorStock", SensorStockSchema);
|
|
|
|
const Install = mongoose.model("Install", installationschema);
|
|
|
|
const Install = mongoose.model("Install", installationschema);
|
|
|
|
const Survey = mongoose.model("Survey", surveyschema);
|
|
|
|
const Survey = mongoose.model("Survey", surveyschema);
|
|
|
|
|
|
|
|
const Support = mongoose.model("Support", supportschema);
|
|
|
|
|
|
|
|
|
|
|
|
const HardwareCart = mongoose.model("HardwareCart", hardwareCartSchema);
|
|
|
|
const HardwareCart = mongoose.model("HardwareCart", hardwareCartSchema);
|
|
|
|
const ServiceCart = mongoose.model("ServiceCart", serviceCartSchema);
|
|
|
|
const ServiceCart = mongoose.model("ServiceCart", serviceCartSchema);
|
|
|
@ -792,4 +862,4 @@ const Iotprice = mongoose.model('Iotprice', iotpriceSchema);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {MaterialRecievedPictures,PlumbingWorkPictures,ElectrictyWorkPictures,MasterSlaveData,SensorStock,Order,EstimationOrder,Iotprice,Sales, Install,Survey, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,ProfilePictureStore,WaterLeverSensor,MotorSwitchSensor,Insensors,generatequatationId, HardwareCart, ServiceCart};
|
|
|
|
module.exports = {Support,MaterialRecievedPictures,PlumbingWorkPictures,ElectrictyWorkPictures,MasterSlaveData,SensorStock,Order,EstimationOrder,Iotprice,Sales, Install,Survey, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,ProfilePictureStore,WaterLeverSensor,MotorSwitchSensor,Insensors,generatequatationId, HardwareCart, ServiceCart};
|
|
|
|