Bläddra i källkod

change schema sparepart

master
Yusmardianto 4 år sedan
förälder
incheckning
2b26f8776d
11 ändrade filer med 232 tillägg och 10 borttagningar
  1. +0
    -10
      api/accessories/models/accessories.settings.json
  2. +52
    -0
      api/yamalube/config/routes.json
  3. +8
    -0
      api/yamalube/controllers/yamalube.js
  4. +8
    -0
      api/yamalube/models/yamalube.js
  5. +40
    -0
      api/yamalube/models/yamalube.settings.json
  6. +8
    -0
      api/yamalube/services/yamalube.js
  7. +52
    -0
      api/ygp/config/routes.json
  8. +8
    -0
      api/ygp/controllers/ygp.js
  9. +8
    -0
      api/ygp/models/ygp.js
  10. +40
    -0
      api/ygp/models/ygp.settings.json
  11. +8
    -0
      api/ygp/services/ygp.js

+ 0
- 10
api/accessories/models/accessories.settings.json Visa fil

@@ -35,16 +35,6 @@
"plugin": "upload",
"required": false
},
"category_sparepart": {
"type": "enumeration",
"enum": [
"YGP",
"Yamalube",
"Helmet",
"Apparel",
"Accessories"
]
},
"stock": {
"type": "string"
}


+ 52
- 0
api/yamalube/config/routes.json Visa fil

@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/yamalubes",
"handler": "yamalube.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/yamalubes/count",
"handler": "yamalube.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/yamalubes/:id",
"handler": "yamalube.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/yamalubes",
"handler": "yamalube.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/yamalubes/:id",
"handler": "yamalube.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/yamalubes/:id",
"handler": "yamalube.delete",
"config": {
"policies": []
}
}
]
}

+ 8
- 0
api/yamalube/controllers/yamalube.js Visa fil

@@ -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/yamalube/models/yamalube.js Visa fil

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

+ 40
- 0
api/yamalube/models/yamalube.settings.json Visa fil

@@ -0,0 +1,40 @@
{
"kind": "collectionType",
"collectionName": "yamalubes",
"info": {
"name": "Yamalube"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"name": {
"type": "string"
},
"part_code": {
"type": "string"
},
"price": {
"type": "biginteger"
},
"stock": {
"type": "biginteger"
},
"description": {
"type": "richtext"
},
"img": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
}
}
}

+ 8
- 0
api/yamalube/services/yamalube.js Visa fil

@@ -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/ygp/config/routes.json Visa fil

@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/ygps",
"handler": "ygp.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/ygps/count",
"handler": "ygp.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/ygps/:id",
"handler": "ygp.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/ygps",
"handler": "ygp.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/ygps/:id",
"handler": "ygp.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/ygps/:id",
"handler": "ygp.delete",
"config": {
"policies": []
}
}
]
}

+ 8
- 0
api/ygp/controllers/ygp.js Visa fil

@@ -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/ygp/models/ygp.js Visa fil

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

+ 40
- 0
api/ygp/models/ygp.settings.json Visa fil

@@ -0,0 +1,40 @@
{
"kind": "collectionType",
"collectionName": "ygps",
"info": {
"name": "YGP"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"name": {
"type": "string"
},
"part_code": {
"type": "string"
},
"price": {
"type": "biginteger"
},
"stock": {
"type": "biginteger"
},
"description": {
"type": "richtext"
},
"img": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
}
}
}

+ 8
- 0
api/ygp/services/ygp.js Visa fil

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

Laddar…
Avbryt
Spara