@pintahub/database-schemas 3.8.4 → 3.8.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": "3.8.4",
3
+ "version": "3.8.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -305,6 +305,11 @@ const Product = new Schema({
305
305
  index: true,
306
306
  },
307
307
 
308
+ transfer_count: {
309
+ type: Number,
310
+ default: 0,
311
+ },
312
+
308
313
  deleted_at: {
309
314
  type: Date,
310
315
  },
@@ -0,0 +1,53 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const TransferJob = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ product: {
12
+ type: Schema.Types.ObjectId,
13
+ required: true,
14
+ index: true,
15
+ },
16
+
17
+ destination_store: {
18
+ type: Schema.Types.ObjectId,
19
+ required: true,
20
+ },
21
+
22
+ status: {
23
+ type: String,
24
+ trim: true,
25
+ default: 'pending',
26
+ index: true,
27
+ },
28
+
29
+ destination_product: {
30
+ type: Schema.Types.ObjectId,
31
+ },
32
+
33
+ steps: {
34
+ type: Schema.Types.Mixed,
35
+ default: {}
36
+ },
37
+
38
+ processed_at: {
39
+ type: Date,
40
+ },
41
+
42
+ updated_at: {
43
+ type: Date,
44
+ default: Date.now
45
+ },
46
+
47
+ created_at: {
48
+ type: Date,
49
+ default: Date.now
50
+ }
51
+ })
52
+
53
+ module.exports = TransferJob