| @@ -1,2 +1,8 @@ | |||||
| HOST=0.0.0.0 | HOST=0.0.0.0 | ||||
| PORT=1337 | PORT=1337 | ||||
| DATABASE_HOST=172.16.1.8 | |||||
| DATABASE_PORT=3306 | |||||
| DATABASE_NAME=thamrin_ecomm_tbg | |||||
| DATABASE_USERNAME=root | |||||
| DATABASE_PASSWORD=Master81 | |||||
| @@ -2,48 +2,48 @@ | |||||
| "routes": [ | "routes": [ | ||||
| { | { | ||||
| "method": "GET", | "method": "GET", | ||||
| "path": "/categories", | |||||
| "handler": "category.find", | |||||
| "path": "/accessories", | |||||
| "handler": "accessories.find", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| "method": "GET", | "method": "GET", | ||||
| "path": "/categories/count", | |||||
| "handler": "category.count", | |||||
| "path": "/accessories/count", | |||||
| "handler": "accessories.count", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| "method": "GET", | "method": "GET", | ||||
| "path": "/categories/:id", | |||||
| "handler": "category.findOne", | |||||
| "path": "/accessories/:id", | |||||
| "handler": "accessories.findOne", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| "method": "POST", | "method": "POST", | ||||
| "path": "/categories", | |||||
| "handler": "category.create", | |||||
| "path": "/accessories", | |||||
| "handler": "accessories.create", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| "method": "PUT", | "method": "PUT", | ||||
| "path": "/categories/:id", | |||||
| "handler": "category.update", | |||||
| "path": "/accessories/:id", | |||||
| "handler": "accessories.update", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| "method": "DELETE", | "method": "DELETE", | ||||
| "path": "/categories/:id", | |||||
| "handler": "category.delete", | |||||
| "path": "/accessories/:id", | |||||
| "handler": "accessories.delete", | |||||
| "config": { | "config": { | ||||
| "policies": [] | "policies": [] | ||||
| } | } | ||||
| @@ -0,0 +1,85 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "accessories", | |||||
| "info": { | |||||
| "name": "accessories", | |||||
| "description": "" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "name": { | |||||
| "type": "string", | |||||
| "required": true | |||||
| }, | |||||
| "description": { | |||||
| "type": "richtext" | |||||
| }, | |||||
| "price": { | |||||
| "type": "biginteger" | |||||
| }, | |||||
| "part_code": { | |||||
| "type": "string" | |||||
| }, | |||||
| "img": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| }, | |||||
| "category": { | |||||
| "type": "enumeration", | |||||
| "enum": [ | |||||
| "YGP", | |||||
| "Yamalube", | |||||
| "Helmet", | |||||
| "Apparel", | |||||
| "Accessories" | |||||
| ] | |||||
| }, | |||||
| "stock": { | |||||
| "type": "string" | |||||
| }, | |||||
| "img_relate1": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| }, | |||||
| "img_relate2": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| }, | |||||
| "img_relate3": { | |||||
| "model": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -1,24 +0,0 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "categories", | |||||
| "info": { | |||||
| "name": "category" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "name": { | |||||
| "type": "string", | |||||
| "required": true, | |||||
| "unique": true | |||||
| }, | |||||
| "restaurants": { | |||||
| "collection": "restaurant", | |||||
| "via": "categories", | |||||
| "dominant": true | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -42,23 +42,15 @@ | |||||
| "accessories": { | "accessories": { | ||||
| "type": "richtext" | "type": "richtext" | ||||
| }, | }, | ||||
| "film": { | |||||
| "collection": "file", | |||||
| "via": "related", | |||||
| "allowedTypes": [ | |||||
| "images", | |||||
| "files", | |||||
| "videos" | |||||
| ], | |||||
| "plugin": "upload", | |||||
| "required": false | |||||
| }, | |||||
| "business_partner": { | "business_partner": { | ||||
| "model": "business-partner", | "model": "business-partner", | ||||
| "via": "products" | "via": "products" | ||||
| }, | }, | ||||
| "stock": { | "stock": { | ||||
| "type": "biginteger" | "type": "biginteger" | ||||
| }, | |||||
| "film": { | |||||
| "type": "richtext" | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,52 +0,0 @@ | |||||
| { | |||||
| "routes": [ | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/restaurants", | |||||
| "handler": "restaurant.find", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/restaurants/count", | |||||
| "handler": "restaurant.count", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "GET", | |||||
| "path": "/restaurants/:id", | |||||
| "handler": "restaurant.findOne", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "POST", | |||||
| "path": "/restaurants", | |||||
| "handler": "restaurant.create", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "PUT", | |||||
| "path": "/restaurants/:id", | |||||
| "handler": "restaurant.update", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| }, | |||||
| { | |||||
| "method": "DELETE", | |||||
| "path": "/restaurants/:id", | |||||
| "handler": "restaurant.delete", | |||||
| "config": { | |||||
| "policies": [] | |||||
| } | |||||
| } | |||||
| ] | |||||
| } | |||||
| @@ -1,8 +0,0 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) | |||||
| * to customize this controller | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -1,8 +0,0 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) | |||||
| * to customize this model | |||||
| */ | |||||
| module.exports = {}; | |||||
| @@ -1,26 +0,0 @@ | |||||
| { | |||||
| "kind": "collectionType", | |||||
| "collectionName": "restaurants", | |||||
| "info": { | |||||
| "name": "restaurant" | |||||
| }, | |||||
| "options": { | |||||
| "increments": true, | |||||
| "timestamps": true, | |||||
| "draftAndPublish": true | |||||
| }, | |||||
| "attributes": { | |||||
| "name": { | |||||
| "type": "string", | |||||
| "required": true, | |||||
| "unique": true | |||||
| }, | |||||
| "description": { | |||||
| "type": "richtext" | |||||
| }, | |||||
| "categories": { | |||||
| "via": "restaurants", | |||||
| "collection": "category" | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -1,8 +0,0 @@ | |||||
| 'use strict'; | |||||
| /** | |||||
| * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) | |||||
| * to customize this service | |||||
| */ | |||||
| module.exports = {}; | |||||