payservedb 5.6.6 → 5.6.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.6.6",
3
+ "version": "5.6.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,36 +1,44 @@
1
- const mongoose = require('mongoose');
1
+ const mongoose = require("mongoose");
2
2
 
3
3
  // Define the schema for Notifications
4
- const notificationSchema = new mongoose.Schema({
4
+ const notificationSchema = new mongoose.Schema(
5
+ {
5
6
  userId: {
6
- type: mongoose.Schema.Types.ObjectId,
7
- ref: 'User',
8
- required: true
7
+ type: mongoose.Schema.Types.ObjectId,
8
+ ref: "User",
9
+ required: true,
10
+ },
11
+ facilityId: {
12
+ type: mongoose.Schema.Types.ObjectId,
13
+ ref: "Facility",
14
+ required: true,
9
15
  },
10
16
  message: {
11
- type: String,
12
- required: true
17
+ type: String,
18
+ required: true,
13
19
  },
14
20
  read: {
15
- type: Boolean,
16
- default: false
21
+ type: Boolean,
22
+ default: false,
17
23
  },
18
24
  dateRead: {
19
- type: Date,
20
- default: null
25
+ type: Date,
26
+ default: null,
21
27
  },
22
28
  dateUpdated: {
23
- type: Date,
24
- default: null
29
+ type: Date,
30
+ default: null,
25
31
  },
26
32
  dateSent: {
27
- type: Date,
28
- required: true
29
- }
30
- }, {
31
- timestamps: true
32
- });
33
+ type: Date,
34
+ required: true,
35
+ },
36
+ },
37
+ {
38
+ timestamps: true,
39
+ },
40
+ );
33
41
 
34
- const Notification = mongoose.model('Notification', notificationSchema);
42
+ const Notification = mongoose.model("Notification", notificationSchema);
35
43
 
36
44
  module.exports = Notification;