payservedb 3.7.8 → 3.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/package.json
CHANGED
|
@@ -6,6 +6,11 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
6
6
|
ref: 'Facility',
|
|
7
7
|
required: true
|
|
8
8
|
},
|
|
9
|
+
currency: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'Currency',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
9
14
|
unitNumber: {
|
|
10
15
|
type: mongoose.Schema.Types.ObjectId,
|
|
11
16
|
ref: 'Unit',
|
|
@@ -137,6 +142,9 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
137
142
|
timestamps: true
|
|
138
143
|
});
|
|
139
144
|
|
|
145
|
+
// Add index for multi-tenancy queries
|
|
146
|
+
leaseAgreementSchema.index({ facilityId: 1 });
|
|
147
|
+
|
|
140
148
|
const LeaseAgreement = mongoose.model('LeaseAgreement', leaseAgreementSchema);
|
|
141
149
|
|
|
142
|
-
module.exports = LeaseAgreement;
|
|
150
|
+
module.exports = LeaseAgreement;
|