@francesco_ksh/app-ksh-mgd-schemas 1.5.6 → 1.5.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.
Files changed (2) hide show
  1. package/models/Order.js +46 -1
  2. package/package.json +1 -1
package/models/Order.js CHANGED
@@ -160,6 +160,27 @@ const orderSchema = new Schema(
160
160
  ref: 'Discount',
161
161
  },
162
162
  },
163
+ adminCodeDiscount: {
164
+ discountValue: {
165
+ type: Number,
166
+ },
167
+ discountType: {
168
+ type: String,
169
+ },
170
+ discountCode: {
171
+ type: String,
172
+ },
173
+ appliesTo: {
174
+ type: Array,
175
+ },
176
+ discountAmount: {
177
+ type: Number,
178
+ },
179
+ discount: {
180
+ type: Schema.Types.ObjectId,
181
+ ref: 'Discount',
182
+ },
183
+ },
163
184
  },
164
185
  ],
165
186
  chat: {
@@ -228,6 +249,12 @@ const orderSchema = new Schema(
228
249
  deliveryDiscount: {
229
250
  type: Number,
230
251
  },
252
+ adminItemsDiscount: {
253
+ type: Number,
254
+ },
255
+ adminDeliveryDiscount: {
256
+ type: Number,
257
+ },
231
258
  totalAfterTax: {
232
259
  type: Number,
233
260
  },
@@ -239,9 +266,27 @@ const orderSchema = new Schema(
239
266
  },
240
267
  codeDiscount: {
241
268
  delivery: {
242
- originalDeliveryPrice: {
269
+ discountValue: {
243
270
  type: Number,
244
271
  },
272
+ discountType: {
273
+ type: String,
274
+ },
275
+ discountCode: {
276
+ type: String,
277
+ },
278
+ appliesTo: {
279
+ type: Array,
280
+ },
281
+ discountAmount: {
282
+ type: Number,
283
+ },
284
+ discount: {
285
+ type: Schema.Types.ObjectId,
286
+ ref: 'Discount',
287
+ },
288
+ },
289
+ adminDelivery: {
245
290
  discountValue: {
246
291
  type: Number,
247
292
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@francesco_ksh/app-ksh-mgd-schemas",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "Mongoose schema definitions",
5
5
  "main": "index.js",
6
6
  "repository": {