From 102c1b24845ab73059d77b5b1ca3989c3e4243ab Mon Sep 17 00:00:00 2001 From: Yusmardianto Date: Mon, 22 Feb 2021 13:47:26 +0700 Subject: [PATCH] commit --- .../models/business-partner.settings.json | 4 ++ api/carousel/config/routes.json | 52 ++++++++++++++++++++++ api/carousel/controllers/carousel.js | 8 ++++ api/carousel/models/carousel.js | 8 ++++ api/carousel/models/carousel.settings.json | 25 +++++++++++ api/carousel/services/carousel.js | 8 ++++ api/company/config/routes.json | 52 ++++++++++++++++++++++ api/company/controllers/company.js | 8 ++++ api/company/models/company.js | 8 ++++ api/company/models/company.settings.json | 28 ++++++++++++ api/company/services/company.js | 8 ++++ api/product/models/product.settings.json | 4 ++ 12 files changed, 213 insertions(+) create mode 100644 api/carousel/config/routes.json create mode 100644 api/carousel/controllers/carousel.js create mode 100644 api/carousel/models/carousel.js create mode 100644 api/carousel/models/carousel.settings.json create mode 100644 api/carousel/services/carousel.js create mode 100644 api/company/config/routes.json create mode 100644 api/company/controllers/company.js create mode 100644 api/company/models/company.js create mode 100644 api/company/models/company.settings.json create mode 100644 api/company/services/company.js diff --git a/api/business-partner/models/business-partner.settings.json b/api/business-partner/models/business-partner.settings.json index 8e38096..46e8375 100644 --- a/api/business-partner/models/business-partner.settings.json +++ b/api/business-partner/models/business-partner.settings.json @@ -29,6 +29,10 @@ ], "plugin": "upload", "required": false + }, + "products": { + "collection": "product", + "via": "business_partner" } } } diff --git a/api/carousel/config/routes.json b/api/carousel/config/routes.json new file mode 100644 index 0000000..fb2686e --- /dev/null +++ b/api/carousel/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/carousels", + "handler": "carousel.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/carousels/count", + "handler": "carousel.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/carousels/:id", + "handler": "carousel.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/carousels", + "handler": "carousel.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/carousels/:id", + "handler": "carousel.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/carousels/:id", + "handler": "carousel.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/carousel/controllers/carousel.js b/api/carousel/controllers/carousel.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/carousel/controllers/carousel.js @@ -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 = {}; diff --git a/api/carousel/models/carousel.js b/api/carousel/models/carousel.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/carousel/models/carousel.js @@ -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 = {}; diff --git a/api/carousel/models/carousel.settings.json b/api/carousel/models/carousel.settings.json new file mode 100644 index 0000000..55212da --- /dev/null +++ b/api/carousel/models/carousel.settings.json @@ -0,0 +1,25 @@ +{ + "kind": "collectionType", + "collectionName": "carousels", + "info": { + "name": "Carousel" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "img": { + "collection": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/carousel/services/carousel.js b/api/carousel/services/carousel.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/carousel/services/carousel.js @@ -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 = {}; diff --git a/api/company/config/routes.json b/api/company/config/routes.json new file mode 100644 index 0000000..e5c06c9 --- /dev/null +++ b/api/company/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/companies", + "handler": "company.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/companies/count", + "handler": "company.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/companies/:id", + "handler": "company.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/companies", + "handler": "company.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/companies/:id", + "handler": "company.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/companies/:id", + "handler": "company.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/company/controllers/company.js b/api/company/controllers/company.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/company/controllers/company.js @@ -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 = {}; diff --git a/api/company/models/company.js b/api/company/models/company.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/company/models/company.js @@ -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 = {}; diff --git a/api/company/models/company.settings.json b/api/company/models/company.settings.json new file mode 100644 index 0000000..bcde894 --- /dev/null +++ b/api/company/models/company.settings.json @@ -0,0 +1,28 @@ +{ + "kind": "collectionType", + "collectionName": "companies", + "info": { + "name": "Company" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "img": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/company/services/company.js b/api/company/services/company.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/company/services/company.js @@ -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 = {}; diff --git a/api/product/models/product.settings.json b/api/product/models/product.settings.json index eefc2c8..1092731 100644 --- a/api/product/models/product.settings.json +++ b/api/product/models/product.settings.json @@ -52,6 +52,10 @@ ], "plugin": "upload", "required": false + }, + "business_partner": { + "via": "products", + "model": "business-partner" } } }