@cendo/database-schemas 2.0.5 → 2.0.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": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
package/schemas/Order.js CHANGED
@@ -2,6 +2,7 @@ const {Schema} = require('mongoose')
2
2
  const ShippingAddress = require('./types/ShippingAddress')
3
3
  const MoneyObject = require('./types/MoneyObject')
4
4
  const AttachmentObject = require('./types/AttachmentObject')
5
+ const FulfillmentObject = require('./types/FulfillmentObject')
5
6
 
6
7
 
7
8
  const Order = new Schema({
@@ -164,6 +165,11 @@ const Order = new Schema({
164
165
  index: true
165
166
  },
166
167
 
168
+ fulfillments: {
169
+ type: [FulfillmentObject],
170
+ default: []
171
+ },
172
+
167
173
  sync_id: {
168
174
  type: String,
169
175
  trim: true,
@@ -213,5 +219,9 @@ Order.index({
213
219
  'logistic_data.tracking_number': 1,
214
220
  })
215
221
 
222
+ Order.index({
223
+ 'fulfillments.number': 1,
224
+ })
225
+
216
226
  module.exports = Order
217
227
 
@@ -0,0 +1,18 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const FulfillmentObject = new Schema({
5
+ _id: false,
6
+
7
+ number: {
8
+ type: String,
9
+ trim: true,
10
+ },
11
+
12
+ production_status: {
13
+ type: String,
14
+ trim: true,
15
+ },
16
+ })
17
+
18
+ module.exports = FulfillmentObject