@cendo/database-schemas 1.3.5 → 1.3.7

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": "@cendo/database-schemas",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
package/schemas/Order.js CHANGED
@@ -88,6 +88,12 @@ const Order = new Schema({
88
88
  index: true
89
89
  },
90
90
 
91
+ map_sku_attempts: {
92
+ type: Number,
93
+ default: 0,
94
+ index: true
95
+ },
96
+
91
97
  updated_at: {
92
98
  type: Date,
93
99
  default: Date.now
@@ -0,0 +1,38 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const OrderFulfillment = new Schema({
5
+ order: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ number: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+
16
+ external_id: {
17
+ type: String,
18
+ trim: true,
19
+ },
20
+
21
+ production_status: {
22
+ type: String,
23
+ trim: true,
24
+ },
25
+
26
+ updated_at: {
27
+ type: Date,
28
+ default: Date.now
29
+ },
30
+
31
+ created_at: {
32
+ type: Date,
33
+ default: Date.now,
34
+ index: true,
35
+ }
36
+ })
37
+
38
+ module.exports = OrderFulfillment
@@ -0,0 +1,29 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const OrderHistory = new Schema({
5
+ order: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ action: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+
16
+ description: {
17
+ type: String,
18
+ trim: true,
19
+ },
20
+
21
+ created_at: {
22
+ type: Date,
23
+ default: Date.now,
24
+ index: true,
25
+ }
26
+ })
27
+
28
+ module.exports = OrderHistory
29
+
@@ -0,0 +1,42 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const OrderLog = new Schema({
5
+ order: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ level: {
12
+ type: String,
13
+ trim: true,
14
+ default: 'info',
15
+ enum: ['info', 'warning', 'error']
16
+ },
17
+
18
+ label: {
19
+ type: String,
20
+ trim: true,
21
+ default: '',
22
+ },
23
+
24
+ message: {
25
+ type: String,
26
+ trim: true,
27
+ },
28
+
29
+ meta: {
30
+ type: Schema.Types.Mixed,
31
+ },
32
+
33
+ created_at: {
34
+ type: Date,
35
+ default: Date.now,
36
+ index: true,
37
+ expires: 90 * 24 * 3600//90 days
38
+ }
39
+ })
40
+
41
+ module.exports = OrderLog
42
+