payservedb 3.1.4 → 3.1.5

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": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -12,10 +12,22 @@ const valueAddedServiceSchema = new mongoose.Schema({
12
12
  required: true,
13
13
  trim: true
14
14
  },
15
+ serviceType: {
16
+ type: String,
17
+ required: true,
18
+ },
15
19
  appliesTo: {
16
- type: [String],
17
- default: []
18
- }
20
+ type: [String],
21
+ default: []
22
+ },
23
+ applicableTaxes: [{
24
+ taxId: {
25
+ type: mongoose.Schema.Types.ObjectId,
26
+ ref: 'CountryTaxRate'
27
+ },
28
+ taxName: String,
29
+ taxRate: Number
30
+ }]
19
31
  }, {
20
32
  timestamps: true
21
33
  });
@@ -42,9 +42,6 @@ const meterSchema = new mongoose.Schema({
42
42
  timestamps: true,
43
43
  });
44
44
 
45
- // Add index for better query performance
46
- meterSchema.index({ serialNumber: 1 });
47
-
48
45
  const Meter = mongoose.model('Meter', meterSchema);
49
46
 
50
47
  module.exports = Meter;