From 0d9aecaedaefd0d88759e89eaa74177d387d26b1 Mon Sep 17 00:00:00 2001 From: yusmar Date: Tue, 22 Jun 2021 09:26:21 +0700 Subject: [PATCH] add collc type product suzuki, honda, hino --- api/product-hino/config/routes.json | 52 ++++++++++++++++++++++ api/product-hino/controllers/product-hino.js | 8 ++++ api/product-hino/models/product-hino.js | 8 ++++ api/product-hino/models/product-hino.settings.json | 44 ++++++++++++++++++ api/product-hino/services/product-hino.js | 8 ++++ api/product-honda/config/routes.json | 52 ++++++++++++++++++++++ api/product-honda/controllers/product-honda.js | 8 ++++ api/product-honda/models/product-honda.js | 8 ++++ .../models/product-honda.settings.json | 44 ++++++++++++++++++ api/product-honda/services/product-honda.js | 8 ++++ api/products-suzuki/config/routes.json | 52 ++++++++++++++++++++++ api/products-suzuki/controllers/products-suzuki.js | 8 ++++ api/products-suzuki/models/products-suzuki.js | 8 ++++ .../models/products-suzuki.settings.json | 44 ++++++++++++++++++ api/products-suzuki/services/products-suzuki.js | 8 ++++ package.json | 2 +- 16 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 api/product-hino/config/routes.json create mode 100644 api/product-hino/controllers/product-hino.js create mode 100644 api/product-hino/models/product-hino.js create mode 100644 api/product-hino/models/product-hino.settings.json create mode 100644 api/product-hino/services/product-hino.js create mode 100644 api/product-honda/config/routes.json create mode 100644 api/product-honda/controllers/product-honda.js create mode 100644 api/product-honda/models/product-honda.js create mode 100644 api/product-honda/models/product-honda.settings.json create mode 100644 api/product-honda/services/product-honda.js create mode 100644 api/products-suzuki/config/routes.json create mode 100644 api/products-suzuki/controllers/products-suzuki.js create mode 100644 api/products-suzuki/models/products-suzuki.js create mode 100644 api/products-suzuki/models/products-suzuki.settings.json create mode 100644 api/products-suzuki/services/products-suzuki.js diff --git a/api/product-hino/config/routes.json b/api/product-hino/config/routes.json new file mode 100644 index 0000000..b9aeb97 --- /dev/null +++ b/api/product-hino/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/product-hinos", + "handler": "product-hino.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/product-hinos/count", + "handler": "product-hino.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/product-hinos/:id", + "handler": "product-hino.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/product-hinos", + "handler": "product-hino.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/product-hinos/:id", + "handler": "product-hino.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/product-hinos/:id", + "handler": "product-hino.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/product-hino/controllers/product-hino.js b/api/product-hino/controllers/product-hino.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/product-hino/controllers/product-hino.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/product-hino/models/product-hino.js b/api/product-hino/models/product-hino.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/product-hino/models/product-hino.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/product-hino/models/product-hino.settings.json b/api/product-hino/models/product-hino.settings.json new file mode 100644 index 0000000..a163aef --- /dev/null +++ b/api/product-hino/models/product-hino.settings.json @@ -0,0 +1,44 @@ +{ + "kind": "collectionType", + "collectionName": "product_hinos", + "info": { + "name": "ProductHino", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "text" + }, + "price": { + "type": "biginteger" + }, + "price1": { + "type": "biginteger" + }, + "price2": { + "type": "biginteger" + }, + "stock": { + "type": "biginteger" + }, + "img": { + "collection": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/product-hino/services/product-hino.js b/api/product-hino/services/product-hino.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/product-hino/services/product-hino.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-honda/config/routes.json b/api/product-honda/config/routes.json new file mode 100644 index 0000000..a2e4906 --- /dev/null +++ b/api/product-honda/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/product-hondas", + "handler": "product-honda.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/product-hondas/count", + "handler": "product-honda.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/product-hondas/:id", + "handler": "product-honda.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/product-hondas", + "handler": "product-honda.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/product-hondas/:id", + "handler": "product-honda.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/product-hondas/:id", + "handler": "product-honda.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/product-honda/controllers/product-honda.js b/api/product-honda/controllers/product-honda.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/product-honda/controllers/product-honda.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/product-honda/models/product-honda.js b/api/product-honda/models/product-honda.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/product-honda/models/product-honda.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/product-honda/models/product-honda.settings.json b/api/product-honda/models/product-honda.settings.json new file mode 100644 index 0000000..993a9ff --- /dev/null +++ b/api/product-honda/models/product-honda.settings.json @@ -0,0 +1,44 @@ +{ + "kind": "collectionType", + "collectionName": "product_hondas", + "info": { + "name": "ProductHonda", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "text" + }, + "price": { + "type": "biginteger" + }, + "price1": { + "type": "biginteger" + }, + "price2": { + "type": "biginteger" + }, + "stock": { + "type": "biginteger" + }, + "img": { + "collection": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/product-honda/services/product-honda.js b/api/product-honda/services/product-honda.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/product-honda/services/product-honda.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/products-suzuki/config/routes.json b/api/products-suzuki/config/routes.json new file mode 100644 index 0000000..54732af --- /dev/null +++ b/api/products-suzuki/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/products-suzukis", + "handler": "products-suzuki.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/products-suzukis/count", + "handler": "products-suzuki.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/products-suzukis/:id", + "handler": "products-suzuki.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/products-suzukis", + "handler": "products-suzuki.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/products-suzukis/:id", + "handler": "products-suzuki.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/products-suzukis/:id", + "handler": "products-suzuki.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/products-suzuki/controllers/products-suzuki.js b/api/products-suzuki/controllers/products-suzuki.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/products-suzuki/controllers/products-suzuki.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/products-suzuki/models/products-suzuki.js b/api/products-suzuki/models/products-suzuki.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/products-suzuki/models/products-suzuki.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/products-suzuki/models/products-suzuki.settings.json b/api/products-suzuki/models/products-suzuki.settings.json new file mode 100644 index 0000000..8011e39 --- /dev/null +++ b/api/products-suzuki/models/products-suzuki.settings.json @@ -0,0 +1,44 @@ +{ + "kind": "collectionType", + "collectionName": "products_suzukis", + "info": { + "name": "ProductSuzuki", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "text" + }, + "price1": { + "type": "biginteger" + }, + "stock": { + "type": "biginteger" + }, + "img": { + "collection": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + }, + "price2": { + "type": "biginteger" + }, + "price": { + "type": "biginteger" + } + } +} diff --git a/api/products-suzuki/services/products-suzuki.js b/api/products-suzuki/services/products-suzuki.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/products-suzuki/services/products-suzuki.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/package.json b/package.json index 29b2201..21183a9 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "9bc5e63a-1de4-48f2-919a-bc487e6e2d09" }, "engines": { - "node": ">=10.16.0 <=14.x.x", + "node": ">=10.16.0 <=16.x.x", "npm": ">=6.0.0" }, "license": "MIT"