database-connector 2.5.9 → 2.5.11

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/Order.js CHANGED
@@ -446,8 +446,9 @@ const orderSchema = new mongoose.Schema(
446
446
  totalAmount: { type: Number, required: true },
447
447
  paymentMethodId: {
448
448
  type: mongoose.Schema.Types.ObjectId,
449
- required: true,
449
+ required: false,
450
450
  ref: 'PaymentType',
451
+ default: null
451
452
  },
452
453
  paymentIntentId: {
453
454
  type: mongoose.Schema.Types.ObjectId,
package/models/Policy.js CHANGED
@@ -86,6 +86,9 @@ const { Schema } = require('mongoose');
86
86
  * refund:
87
87
  * type: object
88
88
  * properties:
89
+ * enabled:
90
+ * type: boolean
91
+ * nullable: true
89
92
  * order:
90
93
  * type: object
91
94
  * properties:
@@ -211,6 +214,7 @@ const policySchema = new Schema(
211
214
  productStatus: { type: String, default: '' },
212
215
  returnMethod: { type: String, default: '' },
213
216
  refund: {
217
+ enabled: { type: Boolean, default: null },
214
218
  order: {
215
219
  fixe: { type: Number, default: null },
216
220
  percentage: { type: Number, default: null }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.5.9",
3
+ "version": "2.5.11",
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": {