payservedb 7.9.6 → 7.9.8

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
@@ -94,7 +94,7 @@ const models = {
94
94
  LevyType: require("./src/models/levytype"),
95
95
  LevyContract: require("./src/models/levycontract"),
96
96
  Invoice: require("./src/models/invoice"),
97
- InvoicingSchedule: require("./src/models/invoicingSchedule"),
97
+ InvoicingSchedule: require("./src/models/invoicing_schedule"),
98
98
  Reminder: require("./src/models/reminder"),
99
99
  Penalty: require("./src/models/penalty"),
100
100
  Notifiaction: require("./src/models/notification"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "7.9.6",
3
+ "version": "7.9.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -44,6 +44,26 @@ const inspectionItemSchema = new mongoose.Schema({
44
44
  default: 1,
45
45
  min: [1, 'Default quantity must be at least 1']
46
46
  },
47
+ serialNumber: {
48
+ type: String,
49
+ trim: true,
50
+ default: null
51
+ },
52
+ cost: {
53
+ type: Number,
54
+ default: 0,
55
+ min: [0, 'Cost cannot be negative']
56
+ },
57
+ currencyId: {
58
+ type: mongoose.Schema.Types.ObjectId,
59
+ ref: 'Currency',
60
+ required: false,
61
+ default: null
62
+ },
63
+ images: [{
64
+ type: String,
65
+ trim: true
66
+ }],
47
67
  active: {
48
68
  type: Boolean,
49
69
  default: true
@@ -52,6 +72,12 @@ const inspectionItemSchema = new mongoose.Schema({
52
72
  type: mongoose.Schema.Types.ObjectId,
53
73
  ref: 'Facility',
54
74
  required: true
75
+ },
76
+ unitId: {
77
+ type: mongoose.Schema.Types.ObjectId,
78
+ ref: 'Unit',
79
+ required: false,
80
+ default: null
55
81
  }
56
82
  }, {
57
83
  timestamps: true
@@ -61,6 +87,9 @@ const inspectionItemSchema = new mongoose.Schema({
61
87
  inspectionItemSchema.index({ facilityId: 1 });
62
88
  inspectionItemSchema.index({ facilityId: 1, category: 1 });
63
89
  inspectionItemSchema.index({ facilityId: 1, active: 1 });
90
+ inspectionItemSchema.index({ facilityId: 1, unitId: 1 });
91
+ inspectionItemSchema.index({ unitId: 1, active: 1 });
92
+ inspectionItemSchema.index({ currencyId: 1 });
64
93
 
65
94
  // Create InspectionItem model
66
95
  const InspectionItem = mongoose.model('InspectionItem', inspectionItemSchema);