payservedb 5.8.6 → 5.8.7

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": "5.8.6",
3
+ "version": "5.8.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -28,8 +28,8 @@ const userSchema = new mongoose.Schema({
28
28
  enum: ['Company', 'Project Manager', 'Universal', 'Core', 'Resident', 'Landlord', 'Supplier'],
29
29
  },
30
30
  department: {
31
- type: String,
32
- trim: true,
31
+ type: mongoose.Schema.Types.ObjectId,
32
+ ref: 'FacilityDepartment',
33
33
  },
34
34
  role: {
35
35
  type: String,
@@ -184,4 +184,4 @@ userSchema.index({ fullName: 'text', email: 'text' });
184
184
 
185
185
  const User = mongoose.model('User', userSchema);
186
186
 
187
- module.exports = User;
187
+ module.exports = User;