|
|
@ -51,14 +51,13 @@ const tanksSchema = new mongoose.Schema({
|
|
|
|
auto_min_percentage: { type: String, default: "20" },
|
|
|
|
auto_min_percentage: { type: String, default: "20" },
|
|
|
|
reserved_percentage: { type: String, default: "20" },
|
|
|
|
reserved_percentage: { type: String, default: "20" },
|
|
|
|
auto_max_percentage: { type: String, default: "80" },
|
|
|
|
auto_max_percentage: { type: String, default: "80" },
|
|
|
|
|
|
|
|
|
|
|
|
connections: {
|
|
|
|
connections: {
|
|
|
|
source: { type: String },
|
|
|
|
source: { type: String },
|
|
|
|
inputConnections: [
|
|
|
|
inputConnections: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
inputConnections: { type: String },
|
|
|
|
inputConnections: { type: String },
|
|
|
|
input_type: { type: String },
|
|
|
|
input_type: { type: String },
|
|
|
|
inputismotor: { type: Boolean, },
|
|
|
|
inputismotor: { type: Boolean },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|
motor_status: { type: String, default: "0" },
|
|
|
|
motor_status: { type: String, default: "0" },
|
|
|
|
auto_mode: { type: String, default: "inactive" },
|
|
|
|
auto_mode: { type: String, default: "inactive" },
|
|
|
@ -71,14 +70,15 @@ const tanksSchema = new mongoose.Schema({
|
|
|
|
threshold_type: { type: String, default: "percentage" },
|
|
|
|
threshold_type: { type: String, default: "percentage" },
|
|
|
|
startTime: { type: String, default: null },
|
|
|
|
startTime: { type: String, default: null },
|
|
|
|
start_instance_id: { type: String, default: null },
|
|
|
|
start_instance_id: { type: String, default: null },
|
|
|
|
stopTime:{type: String,default:null}
|
|
|
|
stopTime: { type: String, default: null },
|
|
|
|
|
|
|
|
waterlevelPercentage: { type: String, default: null }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
outputConnections: [
|
|
|
|
outputConnections: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
outputConnections: { type: String },
|
|
|
|
outputConnections: { type: String },
|
|
|
|
output_type: { type: String },
|
|
|
|
output_type: { type: String },
|
|
|
|
outputismotor: { type: Boolean, },
|
|
|
|
outputismotor: { type: Boolean },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|
motor_status: { type: String, default: "0" },
|
|
|
|
motor_status: { type: String, default: "0" },
|
|
|
|
motor_stop_status: { type: String, default: "1" },
|
|
|
|
motor_stop_status: { type: String, default: "1" },
|
|
|
@ -87,15 +87,16 @@ const tanksSchema = new mongoose.Schema({
|
|
|
|
manual_threshold_percentage: { type: String, default: "90" },
|
|
|
|
manual_threshold_percentage: { type: String, default: "90" },
|
|
|
|
manual_threshold_time: { type: String, default: null },
|
|
|
|
manual_threshold_time: { type: String, default: null },
|
|
|
|
threshold_type: { type: String, default: "percentage" },
|
|
|
|
threshold_type: { type: String, default: "percentage" },
|
|
|
|
|
|
|
|
waterlevelPercentage: { type: String, default: null }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
inputWaterlevelPercentage: { type: String, default: null },
|
|
|
|
|
|
|
|
outputWaterlevelPercentage: { type: String, default: null }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const motordataSchema = new mongoose.Schema({
|
|
|
|
const motordataSchema = new mongoose.Schema({
|
|
|
|
customerId: { type: String, default: null },
|
|
|
|
customerId: { type: String, default: null },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|
motor_id: { type: String, default: null },
|
|
|
|