Add channel and message

This commit is contained in:
2025-05-04 19:37:57 +02:00
parent c811ad7e21
commit 498024fc10
11 changed files with 8429 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
{
"kind": "collectionType",
"collectionName": "channels",
"info": {
"singularName": "channel",
"pluralName": "channels",
"displayName": "Channel"
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"TEXT",
"AUDIO",
"VIDEO"
]
},
"choral": {
"type": "relation",
"relation": "manyToOne",
"target": "api::choral.choral",
"inversedBy": "channels"
},
"messages": {
"type": "relation",
"relation": "oneToMany",
"target": "api::message.message",
"mappedBy": "channel"
}
}
}

View File

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

View File

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

View File

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