payservedb 6.2.5 → 6.2.6
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
|
@@ -199,7 +199,8 @@ const models = {
|
|
|
199
199
|
PowerMeterSettings: require("./src/models/powerMeterSettings"),
|
|
200
200
|
FacilityWalletTransactionsMetadata: require("./src/models/facilityWalletTransactionsMetadata"),
|
|
201
201
|
PowerMeterCustomerAccount: require("./src/models/powerMeterCustomerAccount"),
|
|
202
|
-
SmsNotification: require("./src/models/sms_balance_notification")
|
|
202
|
+
SmsNotification: require("./src/models/sms_balance_notification"),
|
|
203
|
+
NegativeBalance: require("./src/models/water_meter_negative_amounts")
|
|
203
204
|
};
|
|
204
205
|
|
|
205
206
|
// Function to get models dynamically from a specific database connection
|
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const negativeBalanceSchema = new mongoose.Schema({
|
|
4
|
+
customerId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Customer',
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
accountId: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'WaterMeterAccount',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
customerName: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
trim: true
|
|
18
|
+
},
|
|
19
|
+
meterNumber: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
trim: true
|
|
23
|
+
},
|
|
24
|
+
amount: {
|
|
25
|
+
type: Number,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
dateRecorded: {
|
|
29
|
+
type: Date,
|
|
30
|
+
required: true,
|
|
31
|
+
default: Date.now
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
timestamps: true
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const NegativeBalance = mongoose.model('NegativeBalance', negativeBalanceSchema);
|
|
38
|
+
|
|
39
|
+
module.exports = NegativeBalance;
|