@cendo/database-schemas 1.9.4 → 1.9.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.9.4",
3
+ "version": "1.9.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
package/schemas/Order.js CHANGED
@@ -142,6 +142,12 @@ const Order = new Schema({
142
142
  index: true
143
143
  },
144
144
 
145
+ push_to_carrier_attempts: {
146
+ type: Number,
147
+ default: 0,
148
+ index: true
149
+ },
150
+
145
151
  sync_id: {
146
152
  type: String,
147
153
  trim: true,
@@ -181,5 +187,9 @@ Order.index({
181
187
  type: 1,
182
188
  })
183
189
 
190
+ Order.index({
191
+ 'logistic_data.tracking_number': 1,
192
+ })
193
+
184
194
  module.exports = Order
185
195
 
@@ -0,0 +1,37 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const ShippingCarrier = new Schema({
5
+ name: {
6
+ type: String,
7
+ trim: true,
8
+ required: true,
9
+ },
10
+
11
+ code: {
12
+ type: String,
13
+ trim: true,
14
+ required: true,
15
+ index: true,
16
+ },
17
+
18
+ status: {
19
+ type: String,
20
+ enum: ['active', 'inactive'],
21
+ default: 'active',
22
+ index: true,
23
+ },
24
+
25
+ updated_at: {
26
+ type: Date,
27
+ default: Date.now
28
+ },
29
+
30
+ created_at: {
31
+ type: Date,
32
+ default: Date.now,
33
+ index: true,
34
+ }
35
+ })
36
+
37
+ module.exports = ShippingCarrier