database-connector 2.5.17 → 2.5.19
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/Payment.js +2 -1
- package/models/PlanType.js +13 -0
- package/package.json +1 -1
package/models/Payment.js
CHANGED
|
@@ -38,6 +38,7 @@ const mongoose = require('mongoose');
|
|
|
38
38
|
* - completed
|
|
39
39
|
* - failed
|
|
40
40
|
* - refunded
|
|
41
|
+
* - conflict
|
|
41
42
|
* paymentAmount:
|
|
42
43
|
* type: number
|
|
43
44
|
* description: Payment amount
|
|
@@ -95,7 +96,7 @@ const paymentSchema = new mongoose.Schema(
|
|
|
95
96
|
paymentStatus: {
|
|
96
97
|
type: String,
|
|
97
98
|
required: true,
|
|
98
|
-
enum: ['requested', 'pending', 'processing', 'completed', 'failed', 'refunded'],
|
|
99
|
+
enum: ['requested', 'pending', 'processing', 'completed', 'failed', 'refunded', 'conflict'],
|
|
99
100
|
default: 'pending',
|
|
100
101
|
},
|
|
101
102
|
paymentAmount: {
|
package/models/PlanType.js
CHANGED
|
@@ -26,6 +26,12 @@ const mongoose = require('mongoose');
|
|
|
26
26
|
* monthsEnabled:
|
|
27
27
|
* type: number
|
|
28
28
|
* description: Number of months the plan type is available/visible (can be null). Active attribute has priority.
|
|
29
|
+
* commission:
|
|
30
|
+
* type: number
|
|
31
|
+
* minimum: 0
|
|
32
|
+
* maximum: 100
|
|
33
|
+
* default: 0
|
|
34
|
+
* description: Commission percentage added to the total amount when the buyer pays
|
|
29
35
|
* features:
|
|
30
36
|
* type: object
|
|
31
37
|
* additionalProperties:
|
|
@@ -50,6 +56,7 @@ const mongoose = require('mongoose');
|
|
|
50
56
|
* scheduled: null
|
|
51
57
|
* active: true
|
|
52
58
|
* monthsEnabled: 12
|
|
59
|
+
* commission: 0
|
|
53
60
|
* features:
|
|
54
61
|
* socialMedia: true
|
|
55
62
|
* BIanalytics: false
|
|
@@ -78,6 +85,12 @@ const planTypeSchema = new mongoose.Schema(
|
|
|
78
85
|
required: false,
|
|
79
86
|
default: null,
|
|
80
87
|
},
|
|
88
|
+
commission: {
|
|
89
|
+
type: Number,
|
|
90
|
+
default: 0,
|
|
91
|
+
min: 0,
|
|
92
|
+
max: 100,
|
|
93
|
+
},
|
|
81
94
|
features: {
|
|
82
95
|
type: Map,
|
|
83
96
|
of: mongoose.Schema.Types.Mixed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "database-connector",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.19",
|
|
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": {
|