database-connector 2.5.10 → 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.
Files changed (2) hide show
  1. package/models/Order.js +2 -1
  2. package/package.json +1 -1
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.5.10",
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": {