payservedb 4.0.9 → 4.1.0

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.0.9",
3
+ "version": "4.1.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -34,11 +34,15 @@ const analogBillingSchema = new mongoose.Schema({
34
34
  type: mongoose.Schema.Types.ObjectId,
35
35
  ref: 'Customer',
36
36
  },
37
+ billingType: {
38
+ type: String,
39
+ enum: ['postpaid', 'prepaid'],
40
+ },
37
41
  status: {
38
42
  type: String,
39
43
  enum: ['pending', 'reviewed', 'billed'],
40
44
  default: 'pending',
41
- }
45
+ },
42
46
  }, {
43
47
  timestamps: true,
44
48
  });
@@ -17,7 +17,7 @@ const waterInvoiceSchema = new mongoose.Schema(
17
17
  required: true,
18
18
  },
19
19
  yearMonth: {
20
- type: String,
20
+ type: String,
21
21
  required: true,
22
22
  },
23
23
  facilityId: {
@@ -28,7 +28,10 @@ const waterInvoiceSchema = new mongoose.Schema(
28
28
  type: mongoose.Schema.Types.ObjectId,
29
29
  required: true
30
30
  },
31
-
31
+ billingType: {
32
+ type: String,
33
+ enum: ['postpaid', 'prepaid'],
34
+ },
32
35
  // Dates
33
36
  dateIssued: {
34
37
  type: Date,