|
|
|
@ -110,7 +110,7 @@ const installationschema = new mongoose.Schema({
|
|
|
|
|
phoneVerificationCode: { type: Number, default: 11111 },
|
|
|
|
|
passwordResetCode: { type: Number, default: 11111 },
|
|
|
|
|
oneTimePasswordSetFlag: { type: Boolean, default: false },
|
|
|
|
|
emails: { type: String, unique: true },
|
|
|
|
|
emails: {type: String},
|
|
|
|
|
services: {
|
|
|
|
|
password: {
|
|
|
|
|
bcrypt: { type: String, required: true }
|
|
|
|
@ -218,7 +218,6 @@ const motorSwitchSensorInSchema = new mongoose.Schema({
|
|
|
|
|
masterId: { type: String, default: null },
|
|
|
|
|
type: { type: String },
|
|
|
|
|
indate: { type: String },
|
|
|
|
|
|
|
|
|
|
qccheck: { type: String, default: null },
|
|
|
|
|
qccheckdate: { type: String, default: null },
|
|
|
|
|
qcby: { type: String, default: null },
|
|
|
|
@ -234,7 +233,35 @@ const motorSwitchSensorInSchema = new mongoose.Schema({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const insensorsSchema = new mongoose.Schema({
|
|
|
|
|
storeId: { type: String },
|
|
|
|
|
hardwareId: { type: String },
|
|
|
|
|
masterId: { type: String, default: null },
|
|
|
|
|
type: { type: String },
|
|
|
|
|
indate: { type: String },
|
|
|
|
|
hardwareId_company: { type: String },
|
|
|
|
|
qccheck: { type: String, default: null },
|
|
|
|
|
qccheckdate: { type: String, default: null },
|
|
|
|
|
qcby: { type: String, default: null },
|
|
|
|
|
comment: { type: String, default: "0" },
|
|
|
|
|
outforrepairdate: { type: String, default: "0" },
|
|
|
|
|
sendto: { type: String, default: null },
|
|
|
|
|
repairfeedback: { type: String, default: "0" },
|
|
|
|
|
dateofinstallation: { type: String, default: null },
|
|
|
|
|
installedby: { type: String, default: "0" },
|
|
|
|
|
customerId: { type: String, default: "0" },
|
|
|
|
|
comments: { type: String, default: "0" },
|
|
|
|
|
quantity: { type: Number, default: 0 },
|
|
|
|
|
batchno: { type: String, default: null },
|
|
|
|
|
sensor_type: { type: String, enum: ['slaves', 'motorswitch', 'master'] }, // adding sensor_type field
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Insensors = mongoose.model('Insensors', insensorsSchema);
|
|
|
|
|
const Store = mongoose.model("Store", storeSchema);
|
|
|
|
|
const WaterLeverSensor = mongoose.model('WaterLeverSensor', waterLeverSensorInSchema);
|
|
|
|
|
const ProfilePictureStore = mongoose.model('ProfilePictureStore', profilePictureStoreSchema);
|
|
|
|
@ -243,4 +270,4 @@ const motorSwitchSensorInSchema = new mongoose.Schema({
|
|
|
|
|
const Install = mongoose.model("Install", installationschema);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = { Install, ProfilePictureInstall, generateinstallationId,Store,ProfilePictureStore,WaterLeverSensor,MotorSwitchSensor};
|
|
|
|
|
module.exports = { Install, ProfilePictureInstall, generateinstallationId,Store,ProfilePictureStore,WaterLeverSensor,MotorSwitchSensor,Insensors};
|
|
|
|
|