payservedb 6.2.3 → 6.2.5
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
|
@@ -198,7 +198,8 @@ const models = {
|
|
|
198
198
|
PowerMeterMonthlyReading: require("./src/models/powerMeterMonthlyReading"),
|
|
199
199
|
PowerMeterSettings: require("./src/models/powerMeterSettings"),
|
|
200
200
|
FacilityWalletTransactionsMetadata: require("./src/models/facilityWalletTransactionsMetadata"),
|
|
201
|
-
PowerMeterCustomerAccount: require("./src/models/powerMeterCustomerAccount")
|
|
201
|
+
PowerMeterCustomerAccount: require("./src/models/powerMeterCustomerAccount"),
|
|
202
|
+
SmsNotification: require("./src/models/sms_balance_notification")
|
|
202
203
|
};
|
|
203
204
|
|
|
204
205
|
// Function to get models dynamically from a specific database connection
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const smsNotificationSchema = new mongoose.Schema({
|
|
4
|
+
accountId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'WaterMeterAccount',
|
|
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 SmsNotification = mongoose.model('SmsNotification', smsNotificationSchema)
|
|
26
|
+
|
|
27
|
+
module.exports = SmsNotification;
|
package/src/models/wallet.js
CHANGED
|
@@ -12,6 +12,11 @@ const walletSchema = new mongoose.Schema(
|
|
|
12
12
|
required: true,
|
|
13
13
|
enum: ["User", "Customer", "Facility"],
|
|
14
14
|
},
|
|
15
|
+
walletType: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
enum: ["levy", "propertyManagement", "lease", "utility", "vas"],
|
|
19
|
+
},
|
|
15
20
|
amount: {
|
|
16
21
|
type: Number,
|
|
17
22
|
default: 0,
|