| @@ -0,0 +1,52 @@ | |||||
| { | |||||
| "routes": [ | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/carts", | |||||
| "handler": "cart.find", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/carts/count", | |||||
| "handler": "cart.count", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/carts/:id", | |||||
| "handler": "cart.findOne", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "POST", | |||||
| "path": "/carts", | |||||
| "handler": "cart.create", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "PUT", | |||||
| "path": "/carts/:id", | |||||
| "handler": "cart.update", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "DELETE", | |||||
| "path": "/carts/:id", | |||||
| "handler": "cart.delete", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| } | |||||
| ] | |||||
| } | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) | |||||
| * to customize this controller | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) | |||||
| * to customize this model | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -0,0 +1,38 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "carts", | |||||
| "info": { | |||||
| "name": "Cart", | |||||
| "description": "" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "product_name": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_price": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "product_color": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_otr": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_img": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) | |||||
| * to customize this service | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -0,0 +1,52 @@ | |||||
| { | |||||
| "routes": [ | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/checkouts", | |||||
| "handler": "checkout.find", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/checkouts/count", | |||||
| "handler": "checkout.count", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/checkouts/:id", | |||||
| "handler": "checkout.findOne", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "POST", | |||||
| "path": "/checkouts", | |||||
| "handler": "checkout.create", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "PUT", | |||||
| "path": "/checkouts/:id", | |||||
| "handler": "checkout.update", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "DELETE", | |||||
| "path": "/checkouts/:id", | |||||
| "handler": "checkout.delete", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| } | |||||
| ] | |||||
| } | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) | |||||
| * to customize this controller | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) | |||||
| * to customize this model | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -0,0 +1,40 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "checkouts", | |||||
| "info": { | |||||
| "name": "Checkout" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "product_name": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_img": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| }, | |||||
| "product_color": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_quantity": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_total": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "transaction_id": { | |||||
| "type": "string" | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,8 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) | |||||
| * to customize this service | |||||
| */ | |||||
| module.exports = {}; | |||||