mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
Events: init
This commit is contained in:
parent
64961b9de5
commit
7eba0b9622
4 changed files with 50 additions and 0 deletions
29
src/api/event/content-types/event/schema.json
Normal file
29
src/api/event/content-types/event/schema.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "events",
|
||||
"info": {
|
||||
"singularName": "event",
|
||||
"pluralName": "events",
|
||||
"displayName": "Event"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "biginteger",
|
||||
"required": true
|
||||
},
|
||||
"extra": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/event/controllers/event.ts
Normal file
7
src/api/event/controllers/event.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* event controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::event.event');
|
||||
7
src/api/event/routes/event.ts
Normal file
7
src/api/event/routes/event.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* event router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::event.event');
|
||||
7
src/api/event/services/event.ts
Normal file
7
src/api/event/services/event.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* event service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::event.event');
|
||||
Loading…
Add table
Add a link
Reference in a new issue