| @@ -0,0 +1,52 @@ | |||||
| { | |||||
| "routes": [ | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/transactions", | |||||
| "handler": "transaction.find", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/transactions/count", | |||||
| "handler": "transaction.count", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/transactions/:id", | |||||
| "handler": "transaction.findOne", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "POST", | |||||
| "path": "/transactions", | |||||
| "handler": "transaction.create", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "PUT", | |||||
| "path": "/transactions/:id", | |||||
| "handler": "transaction.update", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "DELETE", | |||||
| "path": "/transactions/:id", | |||||
| "handler": "transaction.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,55 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "transactions", | |||||
| "info": { | |||||
| "name": "Transaction" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "product_order": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_name": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_quantity": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "product_price": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "product_color": { | |||||
| "type": "string" | |||||
| }, | |||||
| "product_courier": { | |||||
| "type": "string" | |||||
| }, | |||||
| "cust_name": { | |||||
| "type": "string" | |||||
| }, | |||||
| "cust_telp": { | |||||
| "type": "string" | |||||
| }, | |||||
| "cust_address": { | |||||
| "type": "string" | |||||
| }, | |||||
| "note": { | |||||
| "type": "text" | |||||
| }, | |||||
| "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 = {}; | |||||
| @@ -70,6 +70,12 @@ | |||||
| "lastName": { | "lastName": { | ||||
| "type": "string", | "type": "string", | ||||
| "required": true | "required": true | ||||
| }, | |||||
| "telp": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "address": { | |||||
| "type": "richtext" | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||