payservedb 7.8.8 → 7.9.0
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
|
@@ -10,7 +10,6 @@ const powerMeterPowerChargeSchema = new mongoose.Schema({
|
|
|
10
10
|
type: String,
|
|
11
11
|
required: true
|
|
12
12
|
},
|
|
13
|
-
// KPLC Power Charges
|
|
14
13
|
fuelCostCharge: {
|
|
15
14
|
type: Number,
|
|
16
15
|
required: true
|
|
@@ -42,12 +41,46 @@ const powerMeterPowerChargeSchema = new mongoose.Schema({
|
|
|
42
41
|
totalCharge: {
|
|
43
42
|
type: Number,
|
|
44
43
|
required: true
|
|
44
|
+
},
|
|
45
|
+
energyCharge: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 0
|
|
48
|
+
},
|
|
49
|
+
powerFactorSurcharge: {
|
|
50
|
+
type: Number,
|
|
51
|
+
default: 0
|
|
52
|
+
},
|
|
53
|
+
tariff: {
|
|
54
|
+
type: String,
|
|
55
|
+
enum: [
|
|
56
|
+
'Domestic Lifeline',
|
|
57
|
+
'Domestic Ordinary 1',
|
|
58
|
+
'Domestic Ordinary 2',
|
|
59
|
+
'Commercial Low Voltage',
|
|
60
|
+
'Commercial Medium Voltage',
|
|
61
|
+
'Industrial Low Voltage',
|
|
62
|
+
'Industrial Medium Voltage',
|
|
63
|
+
'Industrial High Voltage'
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
assumedConsumedUnit: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0
|
|
69
|
+
},
|
|
70
|
+
repPercentage: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: 5
|
|
73
|
+
},
|
|
74
|
+
vatPercentage: {
|
|
75
|
+
type: Number,
|
|
76
|
+
default: 16
|
|
45
77
|
}
|
|
46
|
-
|
|
47
78
|
}, {
|
|
48
79
|
timestamps: true
|
|
49
80
|
});
|
|
50
81
|
|
|
82
|
+
powerMeterPowerChargeSchema.index({ facilityId: 1, yearMonth: 1 }, { unique: true });
|
|
83
|
+
|
|
51
84
|
const PowerMeterPowerCharge = mongoose.model('PowerMeterPowerCharge', powerMeterPowerChargeSchema);
|
|
52
85
|
|
|
53
|
-
module.exports = PowerMeterPowerCharge;
|
|
86
|
+
module.exports = PowerMeterPowerCharge;
|
|
@@ -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;
|