| @@ -1,8 +0,0 @@ | |||||
| HOST=0.0.0.0 | |||||
| PORT=1337 | |||||
| DATABASE_HOST=172.16.1.8 | |||||
| DATABASE_PORT=3306 | |||||
| DATABASE_NAME=thamrin_ecomm_tbg | |||||
| DATABASE_USERNAME=root | |||||
| DATABASE_PASSWORD=Master81 | |||||
| @@ -19,7 +19,7 @@ | |||||
| "type": "richtext" | "type": "richtext" | ||||
| }, | }, | ||||
| "price": { | "price": { | ||||
| "type": "biginteger" | |||||
| "type": "float" | |||||
| }, | }, | ||||
| "part_code": { | "part_code": { | ||||
| "type": "string" | "type": "string" | ||||
| @@ -29,10 +29,6 @@ | |||||
| ], | ], | ||||
| "plugin": "upload", | "plugin": "upload", | ||||
| "required": false | "required": false | ||||
| }, | |||||
| "products": { | |||||
| "via": "business_partner", | |||||
| "collection": "product" | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,52 @@ | |||||
| { | |||||
| "routes": [ | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/dealers", | |||||
| "handler": "dealers.find", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/dealers/count", | |||||
| "handler": "dealers.count", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/dealers/:id", | |||||
| "handler": "dealers.findOne", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "POST", | |||||
| "path": "/dealers", | |||||
| "handler": "dealers.create", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "PUT", | |||||
| "path": "/dealers/:id", | |||||
| "handler": "dealers.update", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "DELETE", | |||||
| "path": "/dealers/:id", | |||||
| "handler": "dealers.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,32 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "dealers", | |||||
| "info": { | |||||
| "name": "Dealers" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "name": { | |||||
| "type": "string" | |||||
| }, | |||||
| "kota_dealer": { | |||||
| "type": "string" | |||||
| }, | |||||
| "address": { | |||||
| "type": "text" | |||||
| }, | |||||
| "telp": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "email": { | |||||
| "type": "email" | |||||
| }, | |||||
| "location": { | |||||
| "type": "richtext" | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -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 = {}; | |||||
| @@ -31,7 +31,7 @@ | |||||
| "required": true | "required": true | ||||
| }, | }, | ||||
| "price": { | "price": { | ||||
| "type": "biginteger" | |||||
| "type": "float" | |||||
| }, | }, | ||||
| "overview": { | "overview": { | ||||
| "type": "richtext" | "type": "richtext" | ||||
| @@ -42,15 +42,26 @@ | |||||
| "accessories": { | "accessories": { | ||||
| "type": "richtext" | "type": "richtext" | ||||
| }, | }, | ||||
| "business_partner": { | |||||
| "model": "business-partner", | |||||
| "via": "products" | |||||
| }, | |||||
| "stock": { | "stock": { | ||||
| "type": "biginteger" | "type": "biginteger" | ||||
| }, | }, | ||||
| "film": { | "film": { | ||||
| "type": "richtext" | "type": "richtext" | ||||
| }, | |||||
| "categories": { | |||||
| "type": "enumeration", | |||||
| "enum": [ | |||||
| "matic", | |||||
| "maxi", | |||||
| "naked", | |||||
| "sport", | |||||
| "offroad", | |||||
| "moped", | |||||
| "monsterenergy", | |||||
| "cbu", | |||||
| "atv", | |||||
| "powerproduct" | |||||
| ] | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,19 @@ | |||||
| //live | |||||
| HOST=0.0.0.0 | |||||
| PORT=14005 | |||||
| DATABASE_HOST=172.16.1.8 | |||||
| DATABASE_PORT=3306 | |||||
| DATABASE_NAME=thamrin_ecomm_tbg | |||||
| DATABASE_USERNAME=root | |||||
| DATABASE_PASSWORD=Master81 | |||||
| //lokal | |||||
| HOST=0.0.0.0 | |||||
| PORT=1337 | |||||
| DATABASE_HOST=172.16.1.8 | |||||
| DATABASE_PORT=3306 | |||||
| DATABASE_NAME=thamrin_ecomm_tbg | |||||
| DATABASE_USERNAME=root | |||||
| DATABASE_PASSWORD=Master81 | |||||