payservedb 8.0.4 → 8.0.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": "8.0.4",
3
+ "version": "8.0.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -214,13 +214,19 @@ const leaseAgreementSchema = new mongoose.Schema({
214
214
  createdBy: {
215
215
  type: mongoose.Schema.Types.ObjectId,
216
216
  ref: 'User'
217
+ },
218
+ lastInvoiceYearMonth: {
219
+ type: String,
220
+ default: null
221
+ // Format: "2025-09", "2025-10", etc.
217
222
  }
218
223
  }, {
219
224
  timestamps: true
220
225
  });
221
226
 
222
227
  leaseAgreementSchema.index({ facilityId: 1 });
228
+ leaseAgreementSchema.index({ lastInvoiceYearMonth: 1 });
223
229
 
224
230
  const LeaseAgreement = mongoose.model('LeaseAgreement', leaseAgreementSchema);
225
231
 
226
- module.exports = LeaseAgreement;
232
+ module.exports = LeaseAgreement;