Explorar el Código

change schema

master
yusmar hace 4 años
padre
commit
0f3d9385c0
Se han modificado 12 ficheros con 237 adiciones y 1 borrados
  1. +52
    -0
      api/product-otr/config/routes.json
  2. +8
    -0
      api/product-otr/controllers/product-otr.js
  3. +8
    -0
      api/product-otr/models/product-otr.js
  4. +25
    -0
      api/product-otr/models/product-otr.settings.json
  5. +8
    -0
      api/product-otr/services/product-otr.js
  6. +10
    -0
      api/product/models/product.settings.json
  7. +52
    -0
      api/yg-part/config/routes.json
  8. +8
    -0
      api/yg-part/controllers/yg-part.js
  9. +8
    -0
      api/yg-part/models/yg-part.js
  10. +42
    -0
      api/yg-part/models/yg-part.settings.json
  11. +8
    -0
      api/yg-part/services/yg-part.js
  12. +8
    -1
      api/ygp/models/ygp.settings.json

+ 52
- 0
api/product-otr/config/routes.json Ver fichero

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

+ 8
- 0
api/product-otr/controllers/product-otr.js Ver fichero

@@ -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/product-otr/models/product-otr.js Ver fichero

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

+ 25
- 0
api/product-otr/models/product-otr.settings.json Ver fichero

@@ -0,0 +1,25 @@
{
"kind": "collectionType",
"collectionName": "product_otrs",
"info": {
"name": "Product_OTR",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"product": {
"model": "product",
"via": "product_otrs"
},
"name": {
"type": "string"
},
"price": {
"type": "biginteger"
}
}
}

+ 8
- 0
api/product-otr/services/product-otr.js Ver fichero

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

+ 10
- 0
api/product/models/product.settings.json Ver fichero

@@ -223,6 +223,16 @@
},
"otr_price_bengkulu": {
"type": "biginteger"
},
"price1": {
"type": "biginteger"
},
"price2": {
"type": "biginteger"
},
"product_otrs": {
"via": "product",
"collection": "product-otr"
}
}
}

+ 52
- 0
api/yg-part/config/routes.json Ver fichero

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

+ 8
- 0
api/yg-part/controllers/yg-part.js Ver fichero

@@ -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/yg-part/models/yg-part.js Ver fichero

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

+ 42
- 0
api/yg-part/models/yg-part.settings.json Ver fichero

@@ -0,0 +1,42 @@
{
"kind": "collectionType",
"collectionName": "yg_parts",
"info": {
"name": "YGPart",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"name": {
"type": "string"
},
"img": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
},
"ygp_units": {
"collection": "ygp",
"via": "yg_part"
},
"description": {
"type": "text"
},
"price1": {
"type": "biginteger"
},
"price2": {
"type": "biginteger"
}
}
}

+ 8
- 0
api/yg-part/services/yg-part.js Ver fichero

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

+ 8
- 1
api/ygp/models/ygp.settings.json Ver fichero

@@ -2,7 +2,7 @@
"kind": "collectionType",
"collectionName": "ygps",
"info": {
"name": "YGP",
"name": "YGP_Unit",
"description": ""
},
"options": {
@@ -45,6 +45,13 @@
},
"otr_price_bengkulu": {
"type": "biginteger"
},
"yg_part": {
"via": "ygp_units",
"model": "yg-part"
},
"berat": {
"type": "biginteger"
}
}
}

Cargando…
Cancelar
Guardar