Selaa lähdekoodia

add sales collection type

master
yusmar 3 vuotta sitten
vanhempi
commit
5e05593175
5 muutettua tiedostoa jossa 123 lisäystä ja 0 poistoa
  1. +52
    -0
      api/sales-mercy/config/routes.json
  2. +8
    -0
      api/sales-mercy/controllers/sales-mercy.js
  3. +8
    -0
      api/sales-mercy/models/sales-mercy.js
  4. +47
    -0
      api/sales-mercy/models/sales-mercy.settings.json
  5. +8
    -0
      api/sales-mercy/services/sales-mercy.js

+ 52
- 0
api/sales-mercy/config/routes.json Näytä tiedosto

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

+ 8
- 0
api/sales-mercy/controllers/sales-mercy.js Näytä tiedosto

@@ -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/sales-mercy/models/sales-mercy.js Näytä tiedosto

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

+ 47
- 0
api/sales-mercy/models/sales-mercy.settings.json Näytä tiedosto

@@ -0,0 +1,47 @@
{
"kind": "collectionType",
"collectionName": "sales_mercies",
"info": {
"name": "sales-mercy",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"name": {
"type": "string"
},
"telp": {
"type": "string"
},
"email": {
"type": "email"
},
"job_title": {
"type": "string"
},
"foto": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
},
"company": {
"type": "string"
},
"start_on": {
"type": "date"
},
"end_on": {
"type": "date"
}
}
}

+ 8
- 0
api/sales-mercy/services/sales-mercy.js Näytä tiedosto

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

Ladataan…
Peruuta
Tallenna