@pintahub/database-schemas 3.2.1 → 3.2.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/database-schemas",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,6 +37,11 @@ const Product = new Schema({
37
37
  required: true,
38
38
  },
39
39
 
40
+ shop: {
41
+ type: Schema.Types.ObjectId,
42
+ index: true,
43
+ },
44
+
40
45
  id: {
41
46
  type: String,
42
47
  trim: true,
@@ -272,6 +277,11 @@ const Product = new Schema({
272
277
  default: false,
273
278
  },
274
279
 
280
+ media_size: {
281
+ type: Number,
282
+ trim: true,
283
+ },
284
+
275
285
  stage: {//temporary field for edit product
276
286
  type: String,
277
287
  trim: true,
package/schemas/Shop.js CHANGED
@@ -2,9 +2,27 @@ const {Schema} = require('mongoose')
2
2
 
3
3
 
4
4
  const Shop = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
5
11
  name: {
6
12
  type: String,
7
13
  trim: true,
14
+ required: true,
15
+ },
16
+
17
+ handle: {
18
+ type: String,
19
+ trim: true,
20
+ required: true,
21
+ index: true,
22
+ },
23
+
24
+ owner: {
25
+ type: Schema.Types.ObjectId,
8
26
  },
9
27
 
10
28
  updated_at: {