payservedb 5.8.3 → 5.8.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/index.js +2 -1
- package/package.json +1 -1
- package/src/models/facility_departements.js +20 -0
package/index.js
CHANGED
|
@@ -181,7 +181,8 @@ const models = {
|
|
|
181
181
|
Wallet: require("./src/models/wallet"),
|
|
182
182
|
WalletTransaction: require("./src/models/wallet_transactions"),
|
|
183
183
|
GoodsReceivedNote: require("./src/models/goodsReceivedNotes"),
|
|
184
|
-
MeterCommandQueue: require("./src/models/water_meter_Command_Queue")
|
|
184
|
+
MeterCommandQueue: require("./src/models/water_meter_Command_Queue"),
|
|
185
|
+
FacilityDepartment: require("./src/models/facility_departements")
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
// Function to get models dynamically from a specific database connection
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const facilityDepartmentSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
name: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
trim: true
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
timestamps: true
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const FacilityDepartment = mongoose.model('FacilityDepartment', facilityDepartmentSchema);
|
|
19
|
+
|
|
20
|
+
module.exports = FacilityDepartment;
|