payservedb 1.8.8 → 1.8.9

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": "1.8.8",
3
+ "version": "1.8.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -57,6 +57,10 @@ const CustomerSchema = new mongoose.Schema({
57
57
 
58
58
  familyMembers: [
59
59
  {
60
+ _id: {
61
+ type: mongoose.Schema.Types.ObjectId,
62
+ auto: true // Automatically create an ObjectId for each family member
63
+ },
60
64
  name: {
61
65
  type: String,
62
66
  required: false,
@@ -77,6 +81,10 @@ const CustomerSchema = new mongoose.Schema({
77
81
  ],
78
82
  staff: [
79
83
  {
84
+ _id: {
85
+ type: mongoose.Schema.Types.ObjectId,
86
+ auto: true
87
+ },
80
88
  name: {
81
89
  type: String,
82
90
  required: false,
@@ -97,6 +105,10 @@ const CustomerSchema = new mongoose.Schema({
97
105
  ],
98
106
  vehicles: [
99
107
  {
108
+ _id: {
109
+ type: mongoose.Schema.Types.ObjectId,
110
+ auto: true
111
+ },
100
112
  registration: {
101
113
  type: String,
102
114
  required: false
@@ -19,6 +19,10 @@ const EntryExitSchema = mongoose.Schema({
19
19
  required: true
20
20
  }
21
21
  },
22
+ range:{
23
+ type:Number,
24
+ required:true
25
+ },
22
26
  disabled:{
23
27
  type:Boolean,
24
28
  required:true
@@ -14,6 +14,10 @@ const guardSchema = new mongoose.Schema({
14
14
  type: String,
15
15
  required: true
16
16
  },
17
+ email:{
18
+ type:String,
19
+ required:false
20
+ },
17
21
  entryPoints: [],
18
22
  startTime: {
19
23
  type: String,
@@ -19,6 +19,10 @@ const visitLogSchema = new mongoose.Schema({
19
19
  type: mongoose.Schema.Types.ObjectId,
20
20
  ref: 'Customer',
21
21
  },
22
+ qrCode:{
23
+ type:Boolean,
24
+ required:false
25
+ },
22
26
  houseNumber: {
23
27
  type: String,
24
28
  required: false
@@ -31,6 +35,10 @@ const visitLogSchema = new mongoose.Schema({
31
35
  type: Date, // Changed to Date for better handling of time
32
36
  required: false
33
37
  },
38
+ days:{
39
+ type:Number,
40
+ required:false
41
+ },
34
42
  entryPoint:{
35
43
  type:String,
36
44
  required:false
@@ -54,9 +62,12 @@ const visitLogSchema = new mongoose.Schema({
54
62
  visitationCode: {
55
63
  type: Number,
56
64
  required: false
57
-
58
65
  },
59
-
66
+ requestedBy:{
67
+ type:mongoose.Schema.Types.ObjectId,
68
+ ref:"User",
69
+ required:false
70
+ },
60
71
  facilityId: {
61
72
  type: mongoose.Schema.Types.ObjectId,
62
73
  ref: 'Facility',
@@ -29,7 +29,7 @@ const visitorSchema = new mongoose.Schema({
29
29
  type: {
30
30
  type: String,
31
31
  required: false,
32
- enum: ["Staff", "Other","Service Providers","Government Officials/Agents","Student"]
32
+ enum: ["Staff", "Other","Service Providers","Government Officials/Agents","Student",""]
33
33
  },
34
34
  residentId: {
35
35
  type: mongoose.Schema.Types.ObjectId,