payservedb 7.8.8 → 7.8.9

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/index.js CHANGED
@@ -203,8 +203,8 @@ const models = {
203
203
  PowerPrepaidCredit: require("./src/models/power_prepaid_credits"),
204
204
  PowerNegativeBalance: require("./src/models/power_meter_negative_balance"),
205
205
  PowerCommandQueue: require("./src/models/power_meter_command_queue"),
206
+ PowerNotification: require("./src/models/power_sms_notification"),
206
207
  FacilityWalletTransactionsMetadata: require("./src/models/facilityWalletTransactionsMetadata"),
207
- SmsNotification: require("./src/models/sms_balance_notification"),
208
208
  NegativeBalance: require("./src/models/water_meter_negative_amounts"),
209
209
  MasterWorkplan: require("./src/models/master_workplan"),
210
210
  MasterWorkplanChild: require("./src/models/master_workplan_child"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "7.8.8",
3
+ "version": "7.8.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,27 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const PowerNotificationSchema = new mongoose.Schema({
4
+ accountId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'PowerMeterAccount',
7
+ required: true
8
+ },
9
+ currentRange: {
10
+ type: String,
11
+ required: true
12
+ },
13
+ lastNotificationDate: {
14
+ type: Date,
15
+ default: Date.now
16
+ },
17
+ balance: {
18
+ type: Number,
19
+ required: true
20
+ }
21
+ }, {
22
+ timestamps: true
23
+ });
24
+
25
+ const PowerNotification = mongoose.model('PowerNotification', PowerNotificationSchema)
26
+
27
+ module.exports = PowerNotification;