payservedb 4.1.3 → 4.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,43 @@
1
+ const mongoose = require("mongoose")
2
+
3
+ const ServiceChargeInvoiceUploadSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: true,
8
+ },
9
+ customerId: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ item: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ description: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ quantity: {
22
+ type: Number,
23
+ required: true,
24
+ },
25
+ rate: {
26
+ type: Number,
27
+ required: true,
28
+ },
29
+ vat: {
30
+ type: Number,
31
+ required: true,
32
+ },
33
+ account: {
34
+ type: String,
35
+ required: true,
36
+ }
37
+ })
38
+
39
+ const ServiceChargeInvoiceUpload = mongoose.model(
40
+ "ServiceChargeInvoiceUpload",
41
+ ServiceChargeInvoiceUploadSchema
42
+ )
43
+ module.exports = ServiceChargeInvoiceUpload
@@ -0,0 +1,28 @@
1
+ const mongoose = require("mongoose");
2
+
3
+ const ServiceChargePaymentSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: true,
8
+ },
9
+ customerId: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ amount: {
14
+ type: Number,
15
+ required: true,
16
+ },
17
+ account: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ });
22
+
23
+ const ServiceChargePayment = mongoose.model(
24
+ "ServiceChargePayment",
25
+ ServiceChargePaymentSchema
26
+ );
27
+
28
+ module.exports = ServiceChargePayment;
@@ -0,0 +1,51 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const VasInvoicesUpdateSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: true,
8
+ },
9
+ customerId: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ item: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ description: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ quantity: {
22
+ type: Number,
23
+ required: true,
24
+ },
25
+ rate: {
26
+ type: Number,
27
+ required: true,
28
+ },
29
+ ammount: {
30
+ type: Number,
31
+ required: true
32
+ },
33
+ vat: {
34
+ type: Number,
35
+ required: true,
36
+ },
37
+ account: {
38
+ type: String,
39
+ required: true,
40
+ },
41
+ class: {
42
+ type: String,
43
+ required: true
44
+ }
45
+ })
46
+
47
+ const VasInvoicesUpdate = mongoose.model(
48
+ 'VasInvoicesUpdate',
49
+ VasInvoicesUpdateSchema
50
+ );
51
+ module.exports = VasInvoicesUpdate
@@ -0,0 +1,25 @@
1
+ const mongoose = require("mongoose");
2
+
3
+ const VasPaymentSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: true,
8
+ },
9
+ customerId: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ amount: {
14
+ type: Number,
15
+ required: true,
16
+ },
17
+ account: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ });
22
+
23
+ const VasPayment = mongoose.model("VasPayment", VasPaymentSchema);
24
+
25
+ module.exports = VasPayment;
@@ -50,6 +50,10 @@ const waterMeterSettingsSchema = new mongoose.Schema({
50
50
  required: true,
51
51
  default: 0
52
52
  },
53
+ tariffAmountSmart: {
54
+ type: Number,
55
+ default: 0
56
+ },
53
57
  fixedTariffAmount: {
54
58
  type: Number,
55
59
  required: true,
@@ -58,6 +62,19 @@ const waterMeterSettingsSchema = new mongoose.Schema({
58
62
  notifications: {
59
63
  type: Boolean,
60
64
  default: false
65
+ },
66
+ // New fields for notification periods
67
+ dailyNotifications: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ weeklyNotifications: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ allNotifications: {
76
+ type: Boolean,
77
+ default: false
61
78
  }
62
79
  }, {
63
80
  timestamps: true