payservedb 1.8.9 → 1.9.1
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 +1 -1
- package/src/models/customer.js +6 -15
package/package.json
CHANGED
package/src/models/customer.js
CHANGED
|
@@ -57,10 +57,6 @@ 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
|
-
},
|
|
64
60
|
name: {
|
|
65
61
|
type: String,
|
|
66
62
|
required: false,
|
|
@@ -76,15 +72,12 @@ const CustomerSchema = new mongoose.Schema({
|
|
|
76
72
|
qrCode: {
|
|
77
73
|
type: Boolean,
|
|
78
74
|
required: false
|
|
79
|
-
}
|
|
75
|
+
},
|
|
76
|
+
qrUniqueCode: { type: String, unique: true }
|
|
80
77
|
},
|
|
81
78
|
],
|
|
82
79
|
staff: [
|
|
83
80
|
{
|
|
84
|
-
_id: {
|
|
85
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
86
|
-
auto: true
|
|
87
|
-
},
|
|
88
81
|
name: {
|
|
89
82
|
type: String,
|
|
90
83
|
required: false,
|
|
@@ -100,15 +93,12 @@ const CustomerSchema = new mongoose.Schema({
|
|
|
100
93
|
qrCode: {
|
|
101
94
|
type: Boolean,
|
|
102
95
|
required: false
|
|
103
|
-
}
|
|
96
|
+
},
|
|
97
|
+
qrUniqueCode: { type: String, unique: true }
|
|
104
98
|
},
|
|
105
99
|
],
|
|
106
100
|
vehicles: [
|
|
107
101
|
{
|
|
108
|
-
_id: {
|
|
109
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
110
|
-
auto: true
|
|
111
|
-
},
|
|
112
102
|
registration: {
|
|
113
103
|
type: String,
|
|
114
104
|
required: false
|
|
@@ -128,7 +118,8 @@ const CustomerSchema = new mongoose.Schema({
|
|
|
128
118
|
qrCode: {
|
|
129
119
|
type: Boolean,
|
|
130
120
|
required: false
|
|
131
|
-
}
|
|
121
|
+
},
|
|
122
|
+
qrUniqueCode: { type: String, unique: true }
|
|
132
123
|
},
|
|
133
124
|
],
|
|
134
125
|
});
|