Add calendar type

This commit is contained in:
2025-03-31 18:15:55 +02:00
parent b5d58c2c0f
commit 4ae35e1185
6 changed files with 93 additions and 0 deletions

View File

@@ -61,6 +61,12 @@
"relation": "oneToMany",
"target": "api::board.board",
"mappedBy": "choral"
},
"calendar": {
"type": "relation",
"relation": "oneToMany",
"target": "api::event.event",
"mappedBy": "choral"
}
}
}

View File

@@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "events",
"info": {
"singularName": "event",
"pluralName": "events",
"displayName": "Event",
"description": ""
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"start": {
"type": "datetime"
},
"end": {
"type": "datetime"
},
"color": {
"type": "string"
},
"choral": {
"type": "relation",
"relation": "manyToOne",
"target": "api::choral.choral",
"inversedBy": "calendar"
}
}
}

View File

@@ -0,0 +1,7 @@
/**
* event controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::event.event');

View File

@@ -0,0 +1,7 @@
/**
* event router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::event.event');

View File

@@ -0,0 +1,7 @@
/**
* event service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::event.event');