payservedb 6.1.9 → 6.2.1
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
|
@@ -197,7 +197,7 @@ const models = {
|
|
|
197
197
|
PowerMeterManufacturer: require("./src/models/powerMetersManufacturer"),
|
|
198
198
|
PowerMeterMonthlyReading: require("./src/models/powerMeterMonthlyReading"),
|
|
199
199
|
PowerMeterSettings: require("./src/models/powerMeterSettings"),
|
|
200
|
-
|
|
200
|
+
FacilityWalletTransactionsMetadata: require("./src/models/facilityWalletTransactionsMetadata"),
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
// Function to get models dynamically from a specific database connection
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const faclityWalletTransactionsMetadataSchema = new mongoose.Schema({
|
|
4
4
|
invoiceId: {
|
|
5
5
|
type: mongoose.Schema.Types.ObjectId,
|
|
6
6
|
ref: "Invoice",
|
|
@@ -12,6 +12,15 @@ const primaryWalletSchema = new mongoose.Schema({
|
|
|
12
12
|
required: true,
|
|
13
13
|
unique: true,
|
|
14
14
|
},
|
|
15
|
+
amount: {
|
|
16
|
+
type: Number,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
walletId: {
|
|
20
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
21
|
+
ref: "Wallet",
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
15
24
|
status: {
|
|
16
25
|
type: String,
|
|
17
26
|
enum: ["partial", "paid", "cancelled"],
|
|
@@ -25,6 +34,14 @@ const primaryWalletSchema = new mongoose.Schema({
|
|
|
25
34
|
type: Number,
|
|
26
35
|
default: 0,
|
|
27
36
|
},
|
|
37
|
+
paidToLandlord: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
paidToPropertyManager: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
28
45
|
propertyManager: {
|
|
29
46
|
type: mongoose.Schema.Types.ObjectId,
|
|
30
47
|
ref: "User",
|
|
@@ -35,10 +52,6 @@ const primaryWalletSchema = new mongoose.Schema({
|
|
|
35
52
|
ref: "Customer",
|
|
36
53
|
required: true,
|
|
37
54
|
},
|
|
38
|
-
balance: {
|
|
39
|
-
type: Number,
|
|
40
|
-
default: 0,
|
|
41
|
-
},
|
|
42
55
|
facility: {
|
|
43
56
|
type: mongoose.Schema.Types.ObjectId,
|
|
44
57
|
ref: "Facility",
|
|
@@ -46,7 +59,10 @@ const primaryWalletSchema = new mongoose.Schema({
|
|
|
46
59
|
},
|
|
47
60
|
});
|
|
48
61
|
|
|
49
|
-
|
|
50
|
-
const
|
|
62
|
+
faclityWalletTransactionsMetadataSchema.index({ invoiceId: 1 });
|
|
63
|
+
const FacilityWalletTransactionsMetadata = mongoose.model(
|
|
64
|
+
"FacilityWalletTransactionsMetadata",
|
|
65
|
+
faclityWalletTransactionsMetadataSchema,
|
|
66
|
+
);
|
|
51
67
|
|
|
52
|
-
module.exports =
|
|
68
|
+
module.exports = FacilityWalletTransactionsMetadata;
|