@pintahub/database-schemas 2.4.5 → 2.4.8

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": "2.4.5",
3
+ "version": "2.4.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,40 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const Menu = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ id: {
12
+ type: String,
13
+ trim: true,
14
+ index: true,
15
+ },
16
+
17
+ handle: {
18
+ type: String,
19
+ trim: true,
20
+ index: true,
21
+ },
22
+
23
+ title: {
24
+ type: String,
25
+ trim: true,
26
+ },
27
+
28
+ updated_at: {
29
+ type: Date,
30
+ default: Date.now
31
+ },
32
+
33
+ created_at: {
34
+ type: Date,
35
+ default: Date.now,
36
+ index: true
37
+ }
38
+ })
39
+
40
+ module.exports = Menu
@@ -0,0 +1,67 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const MenuItem = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ menu: {
12
+ type: Schema.Types.ObjectId,
13
+ index: true,
14
+ required: true,
15
+ },
16
+
17
+ id: {
18
+ type: String,
19
+ trim: true,
20
+ index: true,
21
+ },
22
+
23
+ title: {
24
+ type: String,
25
+ trim: true,
26
+ },
27
+
28
+ url: {
29
+ type: String,
30
+ trim: true,
31
+ },
32
+
33
+ type: {
34
+ type: String,
35
+ trim: true,
36
+ },
37
+
38
+ parent: {
39
+ type: Schema.Types.ObjectId,
40
+ index: true,
41
+ },
42
+
43
+ position: {
44
+ type: Number,
45
+ default: 0,
46
+ index: true,
47
+ },
48
+
49
+ depth: {
50
+ type: Number,
51
+ default: 0,
52
+ index: true,
53
+ },
54
+
55
+ updated_at: {
56
+ type: Date,
57
+ default: Date.now
58
+ },
59
+
60
+ created_at: {
61
+ type: Date,
62
+ default: Date.now,
63
+ index: true
64
+ }
65
+ })
66
+
67
+ module.exports = MenuItem
@@ -21,6 +21,15 @@ const ProductType = new Schema({
21
21
  index: true,
22
22
  },
23
23
 
24
+ enable_create_product: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+
29
+ base_product: {
30
+ type: Schema.Types.ObjectId,
31
+ },
32
+
24
33
  updated_at: {
25
34
  type: Date,
26
35
  default: Date.now
package/schemas/Review.js CHANGED
@@ -52,6 +52,12 @@ const Review = new Schema({
52
52
  trim: true,
53
53
  },
54
54
 
55
+ is_featured: {
56
+ type: Boolean,
57
+ default: false,
58
+ index: true,
59
+ },
60
+
55
61
  updated_at: {
56
62
  type: Date,
57
63
  default: Date.now,