@pintahub/database-schemas 1.0.2 → 1.0.4

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": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,34 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const Product = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ id: {
12
+ type: String,
13
+ trim: true,
14
+ index: true,
15
+ },
16
+
17
+ title: {
18
+ type: String,
19
+ trim: true,
20
+ },
21
+
22
+ updated_at: {
23
+ type: Date,
24
+ default: Date.now
25
+ },
26
+
27
+ created_at: {
28
+ type: Date,
29
+ default: Date.now
30
+ }
31
+ })
32
+
33
+ module.exports = Product
34
+
@@ -0,0 +1,33 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const ShopifyAPI = new Schema({
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ index: true,
8
+ required: true,
9
+ },
10
+
11
+ admin_access_token: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+
16
+ storefront_access_token: {
17
+ type: String,
18
+ trim: true,
19
+ },
20
+
21
+ updated_at: {
22
+ type: Date,
23
+ default: Date.now
24
+ },
25
+
26
+ created_at: {
27
+ type: Date,
28
+ default: Date.now
29
+ }
30
+ })
31
+
32
+ module.exports = ShopifyAPI
33
+