@pintahub/database-schemas 2.1.9 → 2.2.1
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/package.json +1 -1
- package/schemas/Product.js +28 -0
- package/schemas/ProductFeature.js +5 -0
package/package.json
CHANGED
package/schemas/Product.js
CHANGED
|
@@ -11,6 +11,25 @@ const ProductSource = new Schema({
|
|
|
11
11
|
}
|
|
12
12
|
})
|
|
13
13
|
|
|
14
|
+
const ProductMeta = new Schema({
|
|
15
|
+
_id: false,
|
|
16
|
+
|
|
17
|
+
main_color: {
|
|
18
|
+
type: String,
|
|
19
|
+
trim: true,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
age_group: {
|
|
23
|
+
type: String,
|
|
24
|
+
trim: true,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
gender: {
|
|
28
|
+
type: String,
|
|
29
|
+
trim: true,
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
|
|
14
33
|
const Product = new Schema({
|
|
15
34
|
store: {
|
|
16
35
|
type: Schema.Types.ObjectId,
|
|
@@ -103,6 +122,10 @@ const Product = new Schema({
|
|
|
103
122
|
type: Schema.Types.ObjectId,
|
|
104
123
|
},
|
|
105
124
|
|
|
125
|
+
raw: {
|
|
126
|
+
type: Schema.Types.ObjectId,
|
|
127
|
+
},
|
|
128
|
+
|
|
106
129
|
is_sale_off: {
|
|
107
130
|
type: Boolean,
|
|
108
131
|
default: false,
|
|
@@ -135,6 +158,11 @@ const Product = new Schema({
|
|
|
135
158
|
type: Schema.Types.ObjectId,
|
|
136
159
|
},
|
|
137
160
|
|
|
161
|
+
meta: {
|
|
162
|
+
type: ProductMeta,
|
|
163
|
+
default: {}
|
|
164
|
+
},
|
|
165
|
+
|
|
138
166
|
is_imported: {//temporary filed for importing product
|
|
139
167
|
type: Boolean,
|
|
140
168
|
default: false,
|