database-connector 2.5.7 → 2.5.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/models/Policy.js CHANGED
@@ -19,17 +19,11 @@ const { Schema } = require('mongoose');
19
19
  * pickup:
20
20
  * type: object
21
21
  * properties:
22
- * enabled:
23
- * type: boolean
24
- * default: false
25
22
  * timeLimit:
26
23
  * type: number
27
24
  * delivery:
28
25
  * type: object
29
26
  * properties:
30
- * enabled:
31
- * type: boolean
32
- * default: false
33
27
  * delivery:
34
28
  * type: boolean
35
29
  * zone:
@@ -109,6 +103,12 @@ const { Schema } = require('mongoose');
109
103
  * order:
110
104
  * type: object
111
105
  * properties:
106
+ * enabled:
107
+ * type: boolean
108
+ * default: false
109
+ * autoValidateOrder:
110
+ * type: boolean
111
+ * default: false
112
112
  * notification:
113
113
  * type: object
114
114
  * properties:
@@ -167,13 +167,11 @@ const policySchema = new Schema(
167
167
  },
168
168
  pickup: {
169
169
  type: {
170
- enabled: { type: Boolean, default: false },
171
170
  timeLimit: { type: Number, default: null }
172
171
  }
173
172
  },
174
173
  delivery: {
175
174
  type: {
176
- enabled: { type: Boolean, default: false },
177
175
  delivery: { type: Boolean, default: null },
178
176
  zone: {
179
177
  centerPoint: {
@@ -226,6 +224,8 @@ const policySchema = new Schema(
226
224
  },
227
225
  order: {
228
226
  type: {
227
+ enabled: { type: Boolean, default: false },
228
+ autoValidateOrder: { type: Boolean, default: false },
229
229
  notification: {
230
230
  realtime: { type: Boolean, default: null },
231
231
  time: { type: Number, default: null },
package/models/User.js CHANGED
@@ -33,6 +33,11 @@ const { policySchema } = require('database-connector/models/Policy');
33
33
  * type: boolean
34
34
  * default: false
35
35
  * description: Whether the user is an admin
36
+ * mobilePaymentManager:
37
+ * type: boolean
38
+ * nullable: true
39
+ * default: null
40
+ * description: Whether the payment manager goes to buyers to collect money (null if the user is not a paymentManager)
36
41
  * companyName:
37
42
  * type: string
38
43
  * description: Company name
@@ -189,6 +194,10 @@ const userSchema = new mongoose.Schema(
189
194
  default: null,
190
195
  },
191
196
  isAdmin: { type: Boolean, default: false },
197
+ mobilePaymentManager: {
198
+ type: Boolean,
199
+ default: null,
200
+ },
192
201
  companyName: {
193
202
  type: String,
194
203
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.5.7",
3
+ "version": "2.5.9",
4
4
  "description": "MongoDB models package with Mongoose schemas for e-commerce applications. Includes User, Product, Store, Order and more with built-in validation and virtual properties.",
5
5
  "main": "models/index.js",
6
6
  "scripts": {