Pārlūkot izejas kodu

apparel model

master
Yusmardianto pirms 4 gadiem
vecāks
revīzija
4f249874a9
10 mainītis faili ar 260 papildinājumiem un 0 dzēšanām
  1. +52
    -0
      api/apparel/config/routes.json
  2. +8
    -0
      api/apparel/controllers/apparel.js
  3. +8
    -0
      api/apparel/models/apparel.js
  4. +53
    -0
      api/apparel/models/apparel.settings.json
  5. +8
    -0
      api/apparel/services/apparel.js
  6. +52
    -0
      api/helmet/config/routes.json
  7. +8
    -0
      api/helmet/controllers/helmet.js
  8. +8
    -0
      api/helmet/models/helmet.js
  9. +55
    -0
      api/helmet/models/helmet.settings.json
  10. +8
    -0
      api/helmet/services/helmet.js

+ 52
- 0
api/apparel/config/routes.json Parādīt failu

@@ -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": []
}
}
]
}

+ 8
- 0
api/apparel/controllers/apparel.js Parādīt failu

@@ -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 = {};

+ 8
- 0
api/apparel/models/apparel.js Parādīt failu

@@ -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 = {};

+ 53
- 0
api/apparel/models/apparel.settings.json Parādīt failu

@@ -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
}
}
}

+ 8
- 0
api/apparel/services/apparel.js Parādīt failu

@@ -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 = {};

+ 52
- 0
api/helmet/config/routes.json Parādīt failu

@@ -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": []
}
}
]
}

+ 8
- 0
api/helmet/controllers/helmet.js Parādīt failu

@@ -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 = {};

+ 8
- 0
api/helmet/models/helmet.js Parādīt failu

@@ -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 = {};

+ 55
- 0
api/helmet/models/helmet.settings.json Parādīt failu

@@ -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
}
}
}

+ 8
- 0
api/helmet/services/helmet.js Parādīt failu

@@ -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 = {};

Notiek ielāde…
Atcelt
Saglabāt