lfra_db 1.1.2 → 1.1.4

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": "lfra_db",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -12,6 +12,5 @@
12
12
  "dependencies": {
13
13
  "dotenv": "^16.4.5",
14
14
  "mongoose": "^8.3.5"
15
-
16
15
  }
17
16
  }
@@ -38,7 +38,7 @@ const visitLogSchema = new mongoose.Schema({
38
38
  required: false
39
39
  },
40
40
  startTime: {
41
- type: String,
41
+ type: String,
42
42
  required: true
43
43
  },
44
44
  endTime: {
@@ -81,6 +81,10 @@ const visitLogSchema = new mongoose.Schema({
81
81
  ref: 'User',
82
82
  required: false
83
83
  },
84
+ entryMethod: {
85
+ type: String,
86
+ enum: ['QR_SCAN', 'MANUAL', 'ALLOWED BY GUARD', 'DELIVERY'],
87
+ },
84
88
  facilityId: {
85
89
  type: mongoose.Schema.Types.ObjectId,
86
90
  ref: 'Facility',
@@ -53,11 +53,7 @@ const visitorSchema = new mongoose.Schema({
53
53
  invitationDate: {
54
54
  type: String, // Changed to Date for better handling of dates
55
55
  required: false
56
- },
57
- visitingEndDate: {
58
- type: String,
59
- required: false
60
-     },
56
+ }
61
57
  }, {
62
58
  timestamps: true // Automatically add createdAt and updatedAt fields
63
59
  });