payservedb 3.5.7 → 3.5.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 +3 -1
- package/package.json +1 -1
- package/src/models/account.js +34 -0
- package/src/models/facility_payment_details.js +20 -0
- package/src/models/reminder.js +0 -4
package/index.js
CHANGED
|
@@ -118,7 +118,9 @@ const models = {
|
|
|
118
118
|
Budget:require('./src/models/budget'),
|
|
119
119
|
BudgetCategory:require('./src/models/budgetCategory'),
|
|
120
120
|
Expense:require('./src/models/expense'),
|
|
121
|
-
InvoiceSettings:require('./src/models/levy_invoice_settings')
|
|
121
|
+
InvoiceSettings:require('./src/models/levy_invoice_settings'),
|
|
122
|
+
Account:require('./src/models/account'),
|
|
123
|
+
FacilityPaymentDetails:require('./src/models/facility_payment_details')
|
|
122
124
|
|
|
123
125
|
|
|
124
126
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
const accountSchema = new mongoose.Schema({
|
|
4
|
+
accountNumber: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
unique: true,
|
|
8
|
+
trim: true,
|
|
9
|
+
},
|
|
10
|
+
facilityId: {
|
|
11
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
12
|
+
default: null,
|
|
13
|
+
},
|
|
14
|
+
customerId: {
|
|
15
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
16
|
+
default: null,
|
|
17
|
+
},
|
|
18
|
+
isActive: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true,
|
|
21
|
+
},
|
|
22
|
+
accountType: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
createdAt: {
|
|
26
|
+
type: Date,
|
|
27
|
+
default: Date.now,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// [ {accountnumber:1,facilityId:1},{accountnumber:2, facility:2}]
|
|
32
|
+
const Account = mongoose.model('Account', accountSchema);
|
|
33
|
+
|
|
34
|
+
module.exports = Account;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
const facilityPaymentDetailsSchema = new mongoose.Schema({
|
|
4
|
+
facility: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
},
|
|
7
|
+
shortCode: { type: String },
|
|
8
|
+
passkey: { type: String },
|
|
9
|
+
authorizationKey: {
|
|
10
|
+
type: String,
|
|
11
|
+
},
|
|
12
|
+
module: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: ["All", "Water", "Electricity", "Levy"],
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const FacilityPaymentDetails = mongoose.model('FacilityPaymentDetails', facilityPaymentDetailsSchema);
|
|
19
|
+
|
|
20
|
+
module.exports = FacilityPaymentDetails;
|
package/src/models/reminder.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
2
|
const moment = require("moment-timezone");
|
|
3
3
|
|
|
4
|
-
// Define the schema for Reminder
|
|
5
|
-
const mongoose = require("mongoose");
|
|
6
|
-
const moment = require("moment-timezone");
|
|
7
|
-
|
|
8
4
|
const reminderSchema = new mongoose.Schema(
|
|
9
5
|
{
|
|
10
6
|
name: {
|