|
|
@ -34,6 +34,7 @@ const tanksSchema = new mongoose.Schema({
|
|
|
|
hardwareId: { type: String },
|
|
|
|
hardwareId: { type: String },
|
|
|
|
tankhardwareId: { type: String },
|
|
|
|
tankhardwareId: { type: String },
|
|
|
|
hardwareId_type: { type: String },
|
|
|
|
hardwareId_type: { type: String },
|
|
|
|
|
|
|
|
motor_id:{ type: String ,default: null},
|
|
|
|
hardwareId_company: { type: String },
|
|
|
|
hardwareId_company: { type: String },
|
|
|
|
customerId: { type: String, default: null },
|
|
|
|
customerId: { type: String, default: null },
|
|
|
|
tankName: { type: String, default: null },
|
|
|
|
tankName: { type: String, default: null },
|
|
|
@ -44,7 +45,9 @@ const tanksSchema = new mongoose.Schema({
|
|
|
|
typeOfWater: { type: String, default: null },
|
|
|
|
typeOfWater: { type: String, default: null },
|
|
|
|
waterlevel: { type: String, default: "0" },
|
|
|
|
waterlevel: { type: String, default: "0" },
|
|
|
|
tankLocation: { type: String, default: null },
|
|
|
|
tankLocation: { type: String, default: null },
|
|
|
|
motor_status: { type: String, default: "0" },
|
|
|
|
motor_status: { type: String, default: "1" },
|
|
|
|
|
|
|
|
motor_speed: { type: String, default: "100" },
|
|
|
|
|
|
|
|
motor_temperature: { type: String, default: "0" },
|
|
|
|
waterlevel_at_midnight:{ type: String,default:"0" },
|
|
|
|
waterlevel_at_midnight:{ type: String,default:"0" },
|
|
|
|
total_water_added_from_midnight:{ type: String,default:"0" },
|
|
|
|
total_water_added_from_midnight:{ type: String,default:"0" },
|
|
|
|
connections: {
|
|
|
|
connections: {
|
|
|
@ -108,6 +111,7 @@ const IOttankSchema = new mongoose.Schema({
|
|
|
|
|
|
|
|
|
|
|
|
const Tank = mongoose.model("Tank", tanksSchema);
|
|
|
|
const Tank = mongoose.model("Tank", tanksSchema);
|
|
|
|
const MotorData = mongoose.model("MotorData", motordataSchema);
|
|
|
|
const MotorData = mongoose.model("MotorData", motordataSchema);
|
|
|
|
|
|
|
|
|
|
|
|
const IotData = mongoose.model("IotData", IOttankSchema);
|
|
|
|
const IotData = mongoose.model("IotData", IOttankSchema);
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
Tank, MotorData,IotData
|
|
|
|
Tank, MotorData,IotData
|
|
|
|