database-connector 2.2.12 → 2.2.14
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/FlashDeal.js +16 -0
- package/models/Offer.js +0 -6
- package/package.json +1 -1
package/models/FlashDeal.js
CHANGED
|
@@ -18,6 +18,12 @@ const mongoose = require('mongoose');
|
|
|
18
18
|
* userId:
|
|
19
19
|
* type: string
|
|
20
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
|
|
21
27
|
* name:
|
|
22
28
|
* type: string
|
|
23
29
|
* description: Flash deal name
|
|
@@ -83,6 +89,16 @@ const FlashDealSchema = new mongoose.Schema(
|
|
|
83
89
|
ref: 'User',
|
|
84
90
|
required: true,
|
|
85
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
|
+
},
|
|
86
102
|
name: {
|
|
87
103
|
type: String,
|
|
88
104
|
required: true,
|
package/models/Offer.js
CHANGED
|
@@ -68,9 +68,6 @@ 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
71
|
* addToSlider:
|
|
75
72
|
* type: boolean
|
|
76
73
|
* default: false
|
|
@@ -162,9 +159,6 @@ const OfferSchema = new mongoose.Schema(
|
|
|
162
159
|
ref: 'User',
|
|
163
160
|
default: [],
|
|
164
161
|
},
|
|
165
|
-
description: {
|
|
166
|
-
type: String,
|
|
167
|
-
},
|
|
168
162
|
addToSlider: {
|
|
169
163
|
type: Boolean,
|
|
170
164
|
default: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "database-connector",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.14",
|
|
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": {
|