database-connector 2.5.18 → 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.
Files changed (2) hide show
  1. package/models/PlanType.js +13 -0
  2. package/package.json +1 -1
@@ -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.18",
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": {