From 4f249874a9429d22bd7dadf3d00cc41fcfd35ee6 Mon Sep 17 00:00:00 2001 From: Yusmardianto Date: Mon, 22 Mar 2021 10:22:32 +0700 Subject: [PATCH] apparel model --- api/apparel/config/routes.json | 52 ++++++++++++++++++++++++++++++ api/apparel/controllers/apparel.js | 8 +++++ api/apparel/models/apparel.js | 8 +++++ api/apparel/models/apparel.settings.json | 53 ++++++++++++++++++++++++++++++ api/apparel/services/apparel.js | 8 +++++ api/helmet/config/routes.json | 52 ++++++++++++++++++++++++++++++ api/helmet/controllers/helmet.js | 8 +++++ api/helmet/models/helmet.js | 8 +++++ api/helmet/models/helmet.settings.json | 55 ++++++++++++++++++++++++++++++++ api/helmet/services/helmet.js | 8 +++++ 10 files changed, 260 insertions(+) create mode 100644 api/apparel/config/routes.json create mode 100644 api/apparel/controllers/apparel.js create mode 100644 api/apparel/models/apparel.js create mode 100644 api/apparel/models/apparel.settings.json create mode 100644 api/apparel/services/apparel.js create mode 100644 api/helmet/config/routes.json create mode 100644 api/helmet/controllers/helmet.js create mode 100644 api/helmet/models/helmet.js create mode 100644 api/helmet/models/helmet.settings.json create mode 100644 api/helmet/services/helmet.js diff --git a/api/apparel/config/routes.json b/api/apparel/config/routes.json new file mode 100644 index 0000000..16caf4a --- /dev/null +++ b/api/apparel/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/apparels", + "handler": "apparel.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/apparels/count", + "handler": "apparel.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/apparels/:id", + "handler": "apparel.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/apparels", + "handler": "apparel.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/apparels/:id", + "handler": "apparel.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/apparels/:id", + "handler": "apparel.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/apparel/controllers/apparel.js b/api/apparel/controllers/apparel.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/apparel/controllers/apparel.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/apparel/models/apparel.js b/api/apparel/models/apparel.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/apparel/models/apparel.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/apparel/models/apparel.settings.json b/api/apparel/models/apparel.settings.json new file mode 100644 index 0000000..621a4a3 --- /dev/null +++ b/api/apparel/models/apparel.settings.json @@ -0,0 +1,53 @@ +{ + "kind": "collectionType", + "collectionName": "apparels", + "info": { + "name": "Apparel" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "richtext" + }, + "price": { + "type": "biginteger" + }, + "stock": { + "type": "biginteger" + }, + "part_code": { + "type": "string" + }, + "category": { + "type": "enumeration", + "enum": [ + "RConcept", + "Asia", + "Basic", + "Merchandise", + "Maxi", + "RainSuit", + "motoGP", + "OffRoad" + ] + }, + "img": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/apparel/services/apparel.js b/api/apparel/services/apparel.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/apparel/services/apparel.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/helmet/config/routes.json b/api/helmet/config/routes.json new file mode 100644 index 0000000..27623f5 --- /dev/null +++ b/api/helmet/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/helmets", + "handler": "helmet.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/helmets/count", + "handler": "helmet.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/helmets/:id", + "handler": "helmet.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/helmets", + "handler": "helmet.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/helmets/:id", + "handler": "helmet.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/helmets/:id", + "handler": "helmet.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/helmet/controllers/helmet.js b/api/helmet/controllers/helmet.js new file mode 100644 index 0000000..556f4fc --- /dev/null +++ b/api/helmet/controllers/helmet.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/helmet/models/helmet.js b/api/helmet/models/helmet.js new file mode 100644 index 0000000..dd847ef --- /dev/null +++ b/api/helmet/models/helmet.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/helmet/models/helmet.settings.json b/api/helmet/models/helmet.settings.json new file mode 100644 index 0000000..ac3efdd --- /dev/null +++ b/api/helmet/models/helmet.settings.json @@ -0,0 +1,55 @@ +{ + "kind": "collectionType", + "collectionName": "helmets", + "info": { + "name": "helmet", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "richtext" + }, + "price": { + "type": "biginteger" + }, + "part_code": { + "type": "string" + }, + "category": { + "type": "enumeration", + "enum": [ + "RCONCEPTS", + "MTX", + "RCONCEPT", + "EXTREME", + "RANGER", + "FIGHTER", + "SWIRL", + "CLS", + "UNO" + ] + }, + "stock": { + "type": "biginteger" + }, + "img": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + } + } +} diff --git a/api/helmet/services/helmet.js b/api/helmet/services/helmet.js new file mode 100644 index 0000000..6bc4168 --- /dev/null +++ b/api/helmet/services/helmet.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 = {};