database-connector 2.2.10 → 2.2.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.
@@ -15,6 +15,9 @@ const mongoose = require('mongoose');
15
15
  * id:
16
16
  * type: string
17
17
  * description: The flash deal identifier
18
+ * userId:
19
+ * type: string
20
+ * description: Reference to the user who created the flash deal
18
21
  * name:
19
22
  * type: string
20
23
  * description: Flash deal name
@@ -75,6 +78,11 @@ const mongoose = require('mongoose');
75
78
  */
76
79
  const FlashDealSchema = new mongoose.Schema(
77
80
  {
81
+ userId: {
82
+ type: mongoose.Schema.Types.ObjectId,
83
+ ref: 'User',
84
+ required: true,
85
+ },
78
86
  name: {
79
87
  type: String,
80
88
  required: true,
package/models/Offer.js CHANGED
@@ -68,6 +68,13 @@ const mongoose = require('mongoose');
68
68
  * items:
69
69
  * type: string
70
70
  * description: Array of user IDs (used when type is 'specific')
71
+ * description:
72
+ * type: string
73
+ * description: Offer description
74
+ * addToSlider:
75
+ * type: boolean
76
+ * default: false
77
+ * description: Whether to add this offer to the slider
71
78
  * createdAt:
72
79
  * type: string
73
80
  * format: date-time
@@ -155,6 +162,13 @@ const OfferSchema = new mongoose.Schema(
155
162
  ref: 'User',
156
163
  default: [],
157
164
  },
165
+ description: {
166
+ type: String,
167
+ },
168
+ addToSlider: {
169
+ type: Boolean,
170
+ default: false,
171
+ },
158
172
  },
159
173
  {
160
174
  timestamps: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.2.10",
3
+ "version": "2.2.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": {