payservedb 3.0.6 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
const mongoose = require('mongoose');
|
|
2
2
|
|
|
3
3
|
const meterSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
},
|
|
4
8
|
serialNumber: {
|
|
5
9
|
type: String,
|
|
6
10
|
required: true,
|
|
@@ -25,7 +29,7 @@ const meterSchema = new mongoose.Schema({
|
|
|
25
29
|
status: {
|
|
26
30
|
type: String,
|
|
27
31
|
required: true,
|
|
28
|
-
enum: ['active', 'inactive', 'maintenance', 'faulty'],
|
|
32
|
+
enum: ['active', 'inactive', 'maintenance', 'faulty'],
|
|
29
33
|
default: 'active',
|
|
30
34
|
},
|
|
31
35
|
value: {
|
|
@@ -35,7 +39,7 @@ const meterSchema = new mongoose.Schema({
|
|
|
35
39
|
default: 0,
|
|
36
40
|
},
|
|
37
41
|
}, {
|
|
38
|
-
timestamps: true,
|
|
42
|
+
timestamps: true,
|
|
39
43
|
});
|
|
40
44
|
|
|
41
45
|
// Add index for better query performance
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
const mongoose = require('mongoose');
|
|
2
2
|
|
|
3
3
|
const concentratorSchema = new mongoose.Schema({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
},
|
|
8
|
+
seriaNumber: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true,
|
|
11
|
+
trim: true,
|
|
12
|
+
unique: true,
|
|
13
|
+
},
|
|
14
|
+
manufacturer: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
trim: true,
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
enum: ['active', 'inactive'],
|
|
23
|
+
default: 'active',
|
|
24
|
+
}
|
|
21
25
|
}, {
|
|
22
|
-
|
|
26
|
+
timestamps: true,
|
|
23
27
|
});
|
|
24
28
|
|
|
25
29
|
// Add index for better query performance
|