database-connector 2.2.11 → 2.2.13

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,15 @@ 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
21
+ * sellerId:
22
+ * type: string
23
+ * description: Reference to the seller
24
+ * storeId:
25
+ * type: string
26
+ * description: Reference to the store
18
27
  * name:
19
28
  * type: string
20
29
  * description: Flash deal name
@@ -75,6 +84,21 @@ const mongoose = require('mongoose');
75
84
  */
76
85
  const FlashDealSchema = new mongoose.Schema(
77
86
  {
87
+ userId: {
88
+ type: mongoose.Schema.Types.ObjectId,
89
+ ref: 'User',
90
+ required: true,
91
+ },
92
+ sellerId: {
93
+ type: mongoose.Schema.Types.ObjectId,
94
+ ref: 'User',
95
+ required: true,
96
+ },
97
+ storeId: {
98
+ type: mongoose.Schema.Types.ObjectId,
99
+ ref: 'Store',
100
+ required: true,
101
+ },
78
102
  name: {
79
103
  type: String,
80
104
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.2.11",
3
+ "version": "2.2.13",
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": {