payservedb 4.7.8 → 4.8.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/index.js CHANGED
@@ -144,6 +144,7 @@ const models = {
144
144
  CommonAreaElectricityReading: require('./src/models/common_area_electricity'),
145
145
  CommonAreaWaterReading: require('./src/models/common_area_water'),
146
146
  CommonAreaGeneratorReading: require('./src/models/common_area_generator'),
147
+ CommonAreaUtilityAlert: require('./src/models/common_area_utility_alert'),
147
148
  BookingProperty: require('./src/models/bookingproperty'),
148
149
  BookingReservation: require('./src/models/bookingreservation'),
149
150
  BookingConfig: require('./src/models/bookingconfig'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "4.7.8",
3
+ "version": "4.8.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,6 +1,6 @@
1
1
  const mongoose = require('mongoose');
2
2
 
3
- const alertSchema = new mongoose.Schema({
3
+ const commonAreaUtilityAlertSchema = new mongoose.Schema({
4
4
  facilityId: {
5
5
  type: mongoose.Schema.Types.ObjectId,
6
6
  ref: 'Facility',
@@ -32,7 +32,7 @@ const alertSchema = new mongoose.Schema({
32
32
  }, { timestamps: true });
33
33
 
34
34
  // Compound index for efficient querying
35
- alertSchema.index({ facilityId: 1, date: 1, utilityType: 1 });
35
+ commonAreaUtilityAlertSchema.index({ facilityId: 1, date: 1, utilityType: 1 });
36
36
 
37
- const Alert = mongoose.model('Alert', alertSchema);
38
- module.exports = Alert;
37
+ const CommonAreaUtilityAlert = mongoose.model('CommonAreaUtilityAlert', commonAreaUtilityAlertSchema);
38
+ module.exports = CommonAreaUtilityAlert;