Explorar el Código

change schema product & dealers

master
yusmar hace 4 años
padre
commit
fdd96581dc
Se han modificado 10 ficheros con 161 adiciones y 55 borrados
  1. +3
    -3
      api/dealers/models/dealers.settings.json
  2. +52
    -0
      api/product-image-color/config/routes.json
  3. +8
    -0
      api/product-image-color/controllers/product-image-color.js
  4. +8
    -0
      api/product-image-color/models/product-image-color.js
  5. +33
    -0
      api/product-image-color/models/product-image-color.settings.json
  6. +8
    -0
      api/product-image-color/services/product-image-color.js
  7. +2
    -2
      api/product-otr/models/product-otr.settings.json
  8. +5
    -10
      api/product/models/product.settings.json
  9. +1
    -1
      package.json
  10. +41
    -39
      yarn.lock

+ 3
- 3
api/dealers/models/dealers.settings.json Ver fichero

@@ -20,9 +20,6 @@
"address": {
"type": "text"
},
"telp": {
"type": "biginteger"
},
"email": {
"type": "email"
},
@@ -53,6 +50,9 @@
"Dealer_3S",
"Dealer_YPM"
]
},
"telp": {
"type": "string"
}
}
}

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

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

+ 8
- 0
api/product-image-color/controllers/product-image-color.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-image-color/models/product-image-color.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 = {};

+ 33
- 0
api/product-image-color/models/product-image-color.settings.json Ver fichero

@@ -0,0 +1,33 @@
{
"kind": "collectionType",
"collectionName": "product_image_colors",
"info": {
"name": "Product_Image_Color",
"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
},
"product": {
"model": "product",
"via": "product_image_colors"
}
}
}

+ 8
- 0
api/product-image-color/services/product-image-color.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 = {};

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

@@ -12,8 +12,8 @@
},
"attributes": {
"product": {
"model": "product",
"via": "product_otrs"
"via": "product_otrs",
"model": "product"
},
"name": {
"type": "string"


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

@@ -215,15 +215,6 @@
"spesifikasi_kelistrikan": {
"type": "richtext"
},
"otr_price_sumsel": {
"type": "biginteger"
},
"otr_price_palembang": {
"type": "biginteger"
},
"otr_price_bengkulu": {
"type": "biginteger"
},
"price1": {
"type": "biginteger"
},
@@ -231,8 +222,12 @@
"type": "biginteger"
},
"product_otrs": {
"collection": "product-otr",
"via": "product"
},
"product_image_colors": {
"via": "product",
"collection": "product-otr"
"collection": "product-image-color"
}
}
}

+ 1
- 1
package.json Ver fichero

@@ -11,7 +11,7 @@
},
"devDependencies": {},
"dependencies": {
"knex": "<0.20.0",
"knex": "^0.21.1",
"mysql": "^2.18.1",
"sqlite3": "5.0.0",
"strapi": "3.4.6",


+ 41
- 39
yarn.lock Ver fichero

@@ -2490,7 +2490,7 @@ bluebird@3.5.1:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==

bluebird@^3.5.0, bluebird@^3.5.5, bluebird@^3.7.0, bluebird@^3.7.2:
bluebird@^3.5.0, bluebird@^3.5.5, bluebird@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
@@ -3172,12 +3172,7 @@ color@^3.1.3:
color-convert "^1.9.1"
color-string "^1.5.4"

colorette@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.1.0.tgz#1f943e5a357fac10b4e0f5aaef3b14cdc1af6ec7"
integrity sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg==

colorette@^1.2.1:
colorette@1.2.1, colorette@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==
@@ -3209,10 +3204,10 @@ commander@^2.20.0, commander@^2.20.3:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

commander@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e"
integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==
commander@^6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==

commander@~2.19.0:
version "2.19.0"
@@ -3608,7 +3603,7 @@ date-fns@^2.8.1:
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.17.0.tgz#afa55daea539239db0a64e236ce716ef3d681ba1"
integrity sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==

debug@*, debug@4, debug@^4.1.0, debug@^4.1.1:
debug@*, debug@4, debug@4.3.1, debug@^4.1.0, debug@^4.1.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
@@ -4246,6 +4241,11 @@ eslint-scope@^4.0.3:
esrecurse "^4.1.0"
estraverse "^4.1.1"

esm@^3.2.25:
version "3.2.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==

esprima@~3.1.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
@@ -5582,7 +5582,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"

inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4:
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -5629,11 +5629,16 @@ internal-ip@^4.3.0:
default-gateway "^4.2.0"
ipaddr.js "^1.9.0"

interpret@^1.2.0, interpret@^1.4.0:
interpret@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==

interpret@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9"
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==

intl-format-cache@^4.2.24, intl-format-cache@^4.2.43:
version "4.3.1"
resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.3.1.tgz#484d31a9872161e6c02139349b259a6229ade377"
@@ -6239,26 +6244,23 @@ klona@^2.0.3:
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0"
integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==

knex@<0.20.0:
version "0.19.5"
resolved "https://registry.yarnpkg.com/knex/-/knex-0.19.5.tgz#3597ebecf88a5942f18c3e6d91af53bda59eeb5d"
integrity sha512-Hy258avCVircQq+oj3WBqPzl8jDIte438Qlq+8pt1i/TyLYVA4zPh2uKc7Bx0t+qOpa6D42HJ2jjtl2vagzilw==
knex@^0.21.1:
version "0.21.19"
resolved "https://registry.yarnpkg.com/knex/-/knex-0.21.19.tgz#df504a184eb29e286245839db0867e3ca161af00"
integrity sha512-6etvrq9XI1Ck6mEc/XiXFGVpD1Lmj6v9XWojqZgEbOvyMbW7XRvgZ99yIhN/kaBH+43FEy3xv/AcbRaH+1pJtw==
dependencies:
bluebird "^3.7.0"
colorette "1.1.0"
commander "^3.0.2"
debug "4.1.1"
colorette "1.2.1"
commander "^6.2.0"
debug "4.3.1"
esm "^3.2.25"
getopts "2.2.5"
inherits "~2.0.4"
interpret "^1.2.0"
interpret "^2.2.0"
liftoff "3.1.0"
lodash "^4.17.15"
mkdirp "^0.5.1"
pg-connection-string "2.1.0"
tarn "^2.0.0"
lodash "^4.17.20"
pg-connection-string "2.4.0"
tarn "^3.0.1"
tildify "2.0.0"
uuid "^3.3.3"
v8flags "^3.1.3"
v8flags "^3.2.0"

koa-body@^4.2.0:
version "4.2.0"
@@ -7950,10 +7952,10 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=

pg-connection-string@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.1.0.tgz#e07258f280476540b24818ebb5dca29e101ca502"
integrity sha512-bhlV7Eq09JrRIvo1eKngpwuqKtJnNhZdpdOlvrPrA4dxqXPjxSrbNrfnIDmTpwMyRszrcV4kU5ZA4mMsQUrjdg==
pg-connection-string@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.4.0.tgz#c979922eb47832999a204da5dbe1ebf2341b6a10"
integrity sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==

picomatch@^2.0.4, picomatch@^2.0.7, picomatch@^2.2.1:
version "2.2.2"
@@ -10590,10 +10592,10 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.3"

tarn@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/tarn/-/tarn-2.0.0.tgz#c68499f69881f99ae955b4317ca7d212d942fdee"
integrity sha512-7rNMCZd3s9bhQh47ksAQd92ADFcJUjjbyOvyFjNLwTPpGieFHMC84S+LOzw0fx1uh6hnDz/19r8CPMnIjJlMMA==
tarn@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.1.tgz#ebac2c6dbc6977d34d4526e0a7814200386a8aec"
integrity sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==

term-size@^2.1.0:
version "2.2.1"
@@ -11081,7 +11083,7 @@ v8-compile-cache@^2.1.1:
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132"
integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==

v8flags@^3.1.3:
v8flags@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656"
integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==


Cargando…
Cancelar
Guardar