@pintahub/database-schemas 1.9.4 → 1.9.6

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": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,60 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const Artwork = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ url: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+
16
+ path_file: {
17
+ type: String,
18
+ trim: true,
19
+ },
20
+
21
+ mimetype: {
22
+ type: String,
23
+ trim: true,
24
+ },
25
+
26
+ size: {
27
+ type: Number,
28
+ },
29
+
30
+ zone: {
31
+ type: String,
32
+ trim: true,
33
+ default: 'internal',
34
+ },
35
+
36
+ status: {
37
+ type: String,
38
+ trim: true,
39
+ default: 'pending',
40
+ index: true,
41
+ },
42
+
43
+ attempts: {
44
+ type: Number,
45
+ default: 0,
46
+ },
47
+
48
+ updated_at: {
49
+ type: Date,
50
+ default: Date.now
51
+ },
52
+
53
+ created_at: {
54
+ type: Date,
55
+ default: Date.now
56
+ }
57
+ })
58
+
59
+ module.exports = Artwork
60
+
@@ -0,0 +1,40 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const GroupArtwork = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ group: {
12
+ type: Schema.Types.ObjectId,
13
+ index: true,
14
+ required: true,
15
+ },
16
+
17
+ artwork: {
18
+ type: Schema.Types.ObjectId,
19
+ required: true,
20
+ },
21
+
22
+ location: {
23
+ type: String,
24
+ trim: true,
25
+ default: 'front'
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
+ }
37
+ })
38
+
39
+ module.exports = GroupArtwork
40
+
@@ -24,12 +24,6 @@ const Output = new Schema({
24
24
  trim: true,
25
25
  },
26
26
 
27
- visibility: {
28
- type: String,
29
- default: 'sensitive',
30
- enum: ['sensitive', 'visible']
31
- },
32
-
33
27
  options: {
34
28
  type: [Schema.Types.Mixed],
35
29
  default: [],
@@ -82,6 +76,12 @@ const ProductImport = new Schema({
82
76
  default: [],
83
77
  },
84
78
 
79
+ visibility: {
80
+ type: String,
81
+ default: 'sensitive',
82
+ enum: ['sensitive', 'visible']
83
+ },
84
+
85
85
  raw_data: {
86
86
  type: Schema.Types.Mixed,
87
87
  },