database-connector 2.5.10 → 2.5.12
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/Notification.js +11 -2
- package/models/Order.js +2 -1
- package/package.json +1 -1
package/models/Notification.js
CHANGED
|
@@ -84,7 +84,12 @@ const NotificationSchema = new mongoose.Schema({
|
|
|
84
84
|
enum: [
|
|
85
85
|
'order',
|
|
86
86
|
'offer',
|
|
87
|
-
'subscription'
|
|
87
|
+
'subscription',
|
|
88
|
+
'management_alert',
|
|
89
|
+
'product',
|
|
90
|
+
'product_report',
|
|
91
|
+
'store_report',
|
|
92
|
+
'suggestion_for_user'
|
|
88
93
|
],
|
|
89
94
|
default: ''
|
|
90
95
|
},
|
|
@@ -108,7 +113,11 @@ const NotificationSchema = new mongoose.Schema({
|
|
|
108
113
|
'payment_locked',
|
|
109
114
|
'payment_locked_manager',
|
|
110
115
|
'upcoming_activated',
|
|
111
|
-
'subscription_ended'
|
|
116
|
+
'subscription_ended',
|
|
117
|
+
'new_subscription_created',
|
|
118
|
+
'new_product_created',
|
|
119
|
+
'new_product',
|
|
120
|
+
'new_store_created'
|
|
112
121
|
],
|
|
113
122
|
default: 'Cancel'
|
|
114
123
|
},
|
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:
|
|
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.
|
|
3
|
+
"version": "2.5.12",
|
|
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": {
|