payservedb 4.0.1 → 4.0.2

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": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -21,6 +21,10 @@ const analogMeterSchema = new mongoose.Schema({
21
21
  min: 0,
22
22
  default: 0
23
23
  },
24
+ previousReading: {
25
+ type: Number,
26
+ min: 0,
27
+ },
24
28
  currentReading: {
25
29
  type: Number,
26
30
  min: 0,
@@ -37,9 +41,14 @@ const analogMeterSchema = new mongoose.Schema({
37
41
  default: Date.now
38
42
  },
39
43
  readingHistory: [{
40
- reading: Number,
41
- date: Date,
42
- readBy: String
44
+ previousReading: Number,
45
+ currentReading: Number,
46
+ readingDate: {
47
+ type: Date,
48
+ default: Date.now
49
+ },
50
+ readBy: String,
51
+ consumption: Number
43
52
  }]
44
53
  }, {
45
54
  timestamps: true