payservedb 6.6.9 → 6.7.1

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,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "6.6.9",
3
+ "version": "6.7.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -10,23 +10,24 @@ const powerMeterGatewaySchema = new mongoose.Schema({
10
10
  type: String,
11
11
  required: true
12
12
  },
13
- gatewayNumber: {
13
+ gatewayId: {
14
14
  type: Number,
15
15
  required: false
16
-
17
16
  },
18
- location: {
17
+ manufacturer: {
19
18
  type: String,
20
19
  required: true
21
-
20
+ },
21
+ location: {
22
+ type: String,
23
+ trim: true
22
24
  },
23
25
  type: {
24
26
  type: String,
25
27
  trim: true
26
28
  },
27
29
  status: {
28
- type: String,
29
- required: true
30
+ type: String
30
31
  }
31
32
  }, {
32
33
  timestamps: true
@@ -39,6 +39,18 @@ const powerMeterSchema = new mongoose.Schema({
39
39
  type: Number,
40
40
  default: 0,
41
41
  },
42
+ kwh: {
43
+ type: Number,
44
+ default: 0
45
+ },
46
+ pf: {
47
+ type: Number,
48
+ default: 1.0
49
+ },
50
+ wh: {
51
+ type: Number,
52
+ default: 0
53
+ },
42
54
  lastUpdated: {
43
55
  type: Date,
44
56
  required: true
@@ -95,4 +107,4 @@ const powerMeterSchema = new mongoose.Schema({
95
107
 
96
108
  const PowerMeters = mongoose.model('PowerMeters', powerMeterSchema);
97
109
 
98
- module.exports = PowerMeters;
110
+ module.exports = PowerMeters;
@@ -68,6 +68,10 @@ const waterMeterAccountSchema = new mongoose.Schema({
68
68
  meter_id: {
69
69
  type: mongoose.Schema.Types.ObjectId,
70
70
  ref: 'WaterMeter',
71
+ },
72
+ accountBalance: {
73
+ type: Number,
74
+ default: 0
71
75
  }
72
76
  }, {
73
77
  timestamps: true