payservedb 8.1.1 → 8.1.3

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
@@ -218,7 +218,8 @@ const models = {
218
218
  CoreBaseSettings: require("./src/models/coreBaseSettings"),
219
219
  Recipient: require("./src/models/facilityInvoiceRecipient"),
220
220
  FacilityBillingPrice: require("./src/models/facilityBillingPrices"),
221
- FacilityInvoicePayment: require("./src/models/facilityInvoicePayment")
221
+ FacilityInvoicePayment: require("./src/models/facilityInvoicePayment"),
222
+ CommunicationUserOpt: require("./src/models/communication_user_opt"),
222
223
  };
223
224
 
224
225
  // Function to get models dynamically from a specific database connection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.1.1",
3
+ "version": "8.1.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,24 @@
1
+ const mongoose = require("mongoose");
2
+
3
+ const CommunicationUserOptSchema = new mongoose.Schema({
4
+ user_id: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: "User",
7
+ required: true,
8
+ },
9
+ sms: {
10
+ type: Boolean,
11
+ default: true,
12
+ },
13
+ email: {
14
+ type: Boolean,
15
+ default: true,
16
+ },
17
+ });
18
+
19
+ const CommunicationUserOpt = mongoose.model(
20
+ "CommunicationUserOpt",
21
+ CommunicationUserOptSchema,
22
+ );
23
+
24
+ module.exports = CommunicationUserOpt;
@@ -40,7 +40,10 @@ const powerPrepaidDebitSchema = new mongoose.Schema({
40
40
  type: String,
41
41
  required: true
42
42
  },
43
-
43
+ description: {
44
+ type: String,
45
+ default: 'Usage'
46
+ }
44
47
  }, {
45
48
  timestamps: true
46
49
  });