@pintahub/database-schemas 3.5.7 → 3.5.9

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.5.7",
3
+ "version": "3.5.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/schemas/Order.js CHANGED
@@ -42,6 +42,10 @@ const Order = new Schema({
42
42
  index: true,
43
43
  },
44
44
 
45
+ number: {
46
+ type: Number,
47
+ },
48
+
45
49
  shipping_address: {
46
50
  type: ShippingAddress,
47
51
  },
@@ -0,0 +1,37 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const WebhookEvent = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ topic: {
12
+ type: String,
13
+ index: true,
14
+ required: true,
15
+ },
16
+
17
+ payload: {
18
+ type: Schema.Types.Mixed,
19
+ default: {},
20
+ },
21
+
22
+ is_test: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+
27
+ created_at: {
28
+ type: Date,
29
+ default: Date.now,
30
+ index: true,
31
+ expires: 3_600 * 24 * 7//7 days
32
+ }
33
+ })
34
+
35
+
36
+ module.exports = WebhookEvent
37
+