Yusmardianto pirms 4 gadiem
vecāks
revīzija
2e76bd1c1e
8 mainītis faili ar 127 papildinājumiem un 4 dzēšanām
  1. +52
    -0
      api/courier/config/routes.json
  2. +8
    -0
      api/courier/controllers/courier.js
  3. +8
    -0
      api/courier/models/courier.js
  4. +30
    -0
      api/courier/models/courier.settings.json
  5. +8
    -0
      api/courier/services/courier.js
  6. +2
    -2
      api/partners-login-state/models/partners-login-state.settings.json
  7. +5
    -0
      api/product/models/product.settings.json
  8. +14
    -2
      extensions/users-permissions/models/User.settings.json

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

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

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

+ 30
- 0
api/courier/models/courier.settings.json Parādīt failu

@@ -0,0 +1,30 @@
{
"kind": "collectionType",
"collectionName": "couriers",
"info": {
"name": "Courier"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"name": {
"type": "string"
},
"duration": {
"type": "string"
},
"price": {
"type": "biginteger"
},
"description": {
"type": "richtext"
},
"products": {
"via": "couriers",
"collection": "product"
}
}
}

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

+ 2
- 2
api/partners-login-state/models/partners-login-state.settings.json Parādīt failu

@@ -11,9 +11,9 @@
},
"attributes": {
"user": {
"via": "partners_login_states",
"plugin": "users-permissions",
"model": "user",
"via": "partners_login_states"
"model": "user"
},
"business_partner": {
"model": "business-partner"


+ 5
- 0
api/product/models/product.settings.json Parādīt failu

@@ -66,6 +66,11 @@
"business_partner": {
"model": "business-partner",
"via": "products"
},
"couriers": {
"collection": "courier",
"via": "products",
"dominant": true
}
}
}

+ 14
- 2
extensions/users-permissions/models/User.settings.json Parādīt failu

@@ -60,8 +60,20 @@
"configurable": false
},
"partners_login_states": {
"via": "user",
"collection": "partners-login-state"
"collection": "partners-login-state",
"via": "user"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"nohp": {
"type": "biginteger"
},
"address": {
"type": "text"
}
}
}

Notiek ielāde…
Atcelt
Saglabāt