payservedb 7.8.0 → 7.8.2

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
@@ -200,7 +200,6 @@ const models = {
200
200
  PowerMeterMonthlyReading: require("./src/models/powerMeterMonthlyReading"),
201
201
  PowerMeterSettings: require("./src/models/powerMeterSettings"),
202
202
  FacilityWalletTransactionsMetadata: require("./src/models/facilityWalletTransactionsMetadata"),
203
- PowerMeterCustomerAccount: require("./src/models/powerMeterCustomerAccount"),
204
203
  SmsNotification: require("./src/models/sms_balance_notification"),
205
204
  NegativeBalance: require("./src/models/water_meter_negative_amounts"),
206
205
  MasterWorkplan: require("./src/models/master_workplan"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "7.8.0",
3
+ "version": "7.8.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -3,7 +3,7 @@ const mongoose = require('mongoose');
3
3
  const powerPrepaidCreditSchema = new mongoose.Schema({
4
4
  accountId: {
5
5
  type: mongoose.Schema.Types.ObjectId,
6
- ref: 'PowerMeterCustomerAccount',
6
+ ref: 'PowerMeterAccount',
7
7
  required: true,
8
8
  },
9
9
  meterId: {
@@ -3,7 +3,7 @@ const mongoose = require('mongoose');
3
3
  const powerPrepaidDebitSchema = new mongoose.Schema({
4
4
  accountId: {
5
5
  type: mongoose.Schema.Types.ObjectId,
6
- ref: 'PowerMeterCustomerAccount',
6
+ ref: 'PowerMeterAccount',
7
7
  required: true,
8
8
  },
9
9
  meterId: {
@@ -37,7 +37,6 @@ const waterInvoiceSchema = new mongoose.Schema(
37
37
  default: 0
38
38
  },
39
39
 
40
- // PAYMENTS - Updated structure
41
40
  paymentMethods: {
42
41
  mobilePayment: {
43
42
  status: {
@@ -66,9 +65,7 @@ const waterInvoiceSchema = new mongoose.Schema(
66
65
  }
67
66
  }
68
67
  },
69
-
70
- // Add a separate field for the primary payment method used
71
- primaryPaymentMethod: {
68
+ paymentMethod: {
72
69
  type: String,
73
70
  enum: ['mobile', 'bank', 'cash', 'mixed'],
74
71
  default: null
@@ -15,7 +15,6 @@ const waterMeterSchema = new mongoose.Schema({
15
15
  },
16
16
  serialNumber: {
17
17
  type: String,
18
- required: true,
19
18
  unique: true,
20
19
  trim: true,
21
20
  index: true