@pintahub/database-schemas 4.3.5 → 4.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 +1 -1
- package/schemas/Account.js +9 -3
- package/schemas/Order.js +45 -29
package/package.json
CHANGED
package/schemas/Account.js
CHANGED
|
@@ -5,6 +5,7 @@ const Account = new Schema({
|
|
|
5
5
|
name: {
|
|
6
6
|
type: String,
|
|
7
7
|
trim: true,
|
|
8
|
+
index: true
|
|
8
9
|
},
|
|
9
10
|
|
|
10
11
|
email: {
|
|
@@ -15,7 +16,7 @@ const Account = new Schema({
|
|
|
15
16
|
|
|
16
17
|
password: {
|
|
17
18
|
type: String,
|
|
18
|
-
trim: true
|
|
19
|
+
trim: true
|
|
19
20
|
},
|
|
20
21
|
|
|
21
22
|
role: {
|
|
@@ -27,7 +28,7 @@ const Account = new Schema({
|
|
|
27
28
|
is_creator: {
|
|
28
29
|
type: Boolean,
|
|
29
30
|
default: false,
|
|
30
|
-
index: true
|
|
31
|
+
index: true
|
|
31
32
|
},
|
|
32
33
|
|
|
33
34
|
status: {
|
|
@@ -38,7 +39,12 @@ const Account = new Schema({
|
|
|
38
39
|
},
|
|
39
40
|
|
|
40
41
|
last_active_at: {
|
|
41
|
-
type: Date
|
|
42
|
+
type: Date
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
ad_accounts: {
|
|
46
|
+
type: [String],
|
|
47
|
+
default: []
|
|
42
48
|
},
|
|
43
49
|
|
|
44
50
|
updated_at: {
|
package/schemas/Order.js
CHANGED
|
@@ -7,43 +7,43 @@ const ShippingAddress = new Schema({
|
|
|
7
7
|
|
|
8
8
|
name: {
|
|
9
9
|
type: String,
|
|
10
|
-
trim: true
|
|
10
|
+
trim: true
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
address1: {
|
|
14
14
|
type: String,
|
|
15
|
-
trim: true
|
|
15
|
+
trim: true
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
address2: {
|
|
19
19
|
type: String,
|
|
20
|
-
trim: true
|
|
20
|
+
trim: true
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
city: {
|
|
24
24
|
type: String,
|
|
25
|
-
trim: true
|
|
25
|
+
trim: true
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
province: {
|
|
29
29
|
type: String,
|
|
30
|
-
trim: true
|
|
30
|
+
trim: true
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
zip: {
|
|
34
34
|
type: String,
|
|
35
|
-
trim: true
|
|
35
|
+
trim: true
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
country: {
|
|
39
39
|
type: String,
|
|
40
40
|
trim: true,
|
|
41
|
-
index: true
|
|
41
|
+
index: true
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
phone: {
|
|
45
45
|
type: String,
|
|
46
|
-
trim: true
|
|
46
|
+
trim: true
|
|
47
47
|
}
|
|
48
48
|
})
|
|
49
49
|
|
|
@@ -52,19 +52,19 @@ const Order = new Schema({
|
|
|
52
52
|
store: {
|
|
53
53
|
type: Schema.Types.ObjectId,
|
|
54
54
|
index: true,
|
|
55
|
-
required: true
|
|
55
|
+
required: true
|
|
56
56
|
},
|
|
57
57
|
|
|
58
58
|
id: {
|
|
59
59
|
type: String,
|
|
60
60
|
trim: true,
|
|
61
|
-
index: true
|
|
61
|
+
index: true
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
name: {
|
|
65
65
|
type: String,
|
|
66
66
|
trim: true,
|
|
67
|
-
index: true
|
|
67
|
+
index: true
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
number: {
|
|
@@ -73,54 +73,61 @@ const Order = new Schema({
|
|
|
73
73
|
},
|
|
74
74
|
|
|
75
75
|
shipping_address: {
|
|
76
|
-
type: ShippingAddress
|
|
76
|
+
type: ShippingAddress
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
fulfillment_status: {
|
|
80
80
|
type: String,
|
|
81
81
|
trim: true,
|
|
82
82
|
index: true,
|
|
83
|
-
lowercase: true
|
|
83
|
+
lowercase: true
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
financial_status: {
|
|
87
87
|
type: String,
|
|
88
88
|
trim: true,
|
|
89
89
|
index: true,
|
|
90
|
-
lowercase: true
|
|
90
|
+
lowercase: true
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
cancel_status: {
|
|
94
|
+
type: String,
|
|
95
|
+
trim: true,
|
|
96
|
+
index: true,
|
|
97
|
+
lowercase: true
|
|
91
98
|
},
|
|
92
99
|
|
|
93
100
|
total_price: {
|
|
94
|
-
type: MoneyObject
|
|
101
|
+
type: MoneyObject
|
|
95
102
|
},
|
|
96
103
|
|
|
97
104
|
fulfillment_cost: {
|
|
98
|
-
type: MoneyObject
|
|
105
|
+
type: MoneyObject
|
|
99
106
|
},
|
|
100
107
|
|
|
101
108
|
transaction_fee: {
|
|
102
|
-
type: MoneyObject
|
|
109
|
+
type: MoneyObject
|
|
103
110
|
},
|
|
104
111
|
|
|
105
112
|
payout: {
|
|
106
|
-
type: MoneyObject
|
|
113
|
+
type: MoneyObject
|
|
107
114
|
},
|
|
108
115
|
|
|
109
116
|
email: {
|
|
110
117
|
type: String,
|
|
111
118
|
trim: true,
|
|
112
|
-
index: true
|
|
119
|
+
index: true
|
|
113
120
|
},
|
|
114
121
|
|
|
115
122
|
phone: {
|
|
116
123
|
type: String,
|
|
117
124
|
trim: true,
|
|
118
|
-
index: true
|
|
125
|
+
index: true
|
|
119
126
|
},
|
|
120
127
|
|
|
121
128
|
status_page_url: {
|
|
122
129
|
type: String,
|
|
123
|
-
trim: true
|
|
130
|
+
trim: true
|
|
124
131
|
},
|
|
125
132
|
|
|
126
133
|
last_synced_at: {
|
|
@@ -130,17 +137,17 @@ const Order = new Schema({
|
|
|
130
137
|
|
|
131
138
|
last_request_notify_at: {
|
|
132
139
|
type: Date,
|
|
133
|
-
index: true
|
|
140
|
+
index: true
|
|
134
141
|
},
|
|
135
142
|
|
|
136
143
|
items_count: {
|
|
137
|
-
type: Number
|
|
144
|
+
type: Number
|
|
138
145
|
},
|
|
139
146
|
|
|
140
147
|
vendors: {
|
|
141
148
|
type: [String],
|
|
142
149
|
trim: true,
|
|
143
|
-
index: true
|
|
150
|
+
index: true
|
|
144
151
|
},
|
|
145
152
|
|
|
146
153
|
vendors_count: {
|
|
@@ -151,17 +158,26 @@ const Order = new Schema({
|
|
|
151
158
|
gateway: {
|
|
152
159
|
type: String,
|
|
153
160
|
trim: true,
|
|
154
|
-
index: true
|
|
161
|
+
index: true
|
|
155
162
|
},
|
|
156
163
|
|
|
157
164
|
payment_method: {
|
|
158
165
|
type: String,
|
|
159
|
-
trim: true
|
|
166
|
+
trim: true
|
|
160
167
|
},
|
|
161
168
|
|
|
162
169
|
browser_ip: {
|
|
163
170
|
type: String,
|
|
164
|
-
trim: true
|
|
171
|
+
trim: true
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
cancel_reason: {
|
|
175
|
+
type: String,
|
|
176
|
+
trim: true
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
cancelled_at: {
|
|
180
|
+
type: Date
|
|
165
181
|
},
|
|
166
182
|
|
|
167
183
|
updated_at: {
|
|
@@ -172,7 +188,7 @@ const Order = new Schema({
|
|
|
172
188
|
created_at: {
|
|
173
189
|
type: Date,
|
|
174
190
|
default: Date.now,
|
|
175
|
-
index: true
|
|
191
|
+
index: true
|
|
176
192
|
}
|
|
177
193
|
})
|
|
178
194
|
|
|
@@ -181,7 +197,7 @@ Order.index({
|
|
|
181
197
|
id: 'text',
|
|
182
198
|
email: 'text',
|
|
183
199
|
phone: 'text',
|
|
184
|
-
'shipping_address.name': 'text'
|
|
200
|
+
'shipping_address.name': 'text'
|
|
185
201
|
})
|
|
186
202
|
|
|
187
203
|
module.exports = Order
|