@cendo/database-schemas 1.3.1 → 1.3.3

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.1",
3
+ "version": "1.3.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
package/schemas/Order.js CHANGED
@@ -4,17 +4,17 @@ const MoneyObject = require('./types/MoneyObject')
4
4
 
5
5
 
6
6
  const Order = new Schema({
7
- type: {
7
+ order_id: {
8
8
  type: String,
9
9
  trim: true,
10
- default: 'tiktok',
10
+ index: true,
11
+ required: true
11
12
  },
12
13
 
13
- order_id: {
14
+ type: {
14
15
  type: String,
15
16
  trim: true,
16
- index: true,
17
- required: true
17
+ default: 'tiktok',
18
18
  },
19
19
 
20
20
  ffm_order_number: {
@@ -98,5 +98,10 @@ Order.index({
98
98
  "shipping_address.username": 1,
99
99
  })
100
100
 
101
+ Order.index({
102
+ order_id: 1,
103
+ type: 1,
104
+ })
105
+
101
106
  module.exports = Order
102
107
 
@@ -0,0 +1,42 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const Shop = new Schema({
5
+ type: {
6
+ type: String,
7
+ trim: true,
8
+ default: 'tiktok',
9
+ },
10
+
11
+ seller_id: {
12
+ type: String,
13
+ trim: true,
14
+ index: true,
15
+ },
16
+
17
+ name: {
18
+ type: String,
19
+ trim: true,
20
+ },
21
+
22
+ status: {
23
+ type: String,
24
+ trim: true,
25
+ default: 'active',
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
+ index: true,
37
+ }
38
+ })
39
+
40
+
41
+ module.exports = Shop
42
+
@@ -8,9 +8,7 @@ const TestResponse = new Schema({
8
8
  },
9
9
 
10
10
  code: {
11
- type: String,
12
- trim: true,
13
- index: true,
11
+ type: Number,
14
12
  },
15
13
 
16
14
  message: {