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": "messages",
"info": {
"singularName": "message",
"pluralName": "messages",
"displayName": "Message",
"description": ""
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"content": {
"type": "string"
},
"fileUrl": {
"type": "string"
},
"author": {
"type": "relation",
"relation": "oneToOne",
"target": "plugin::users-permissions.user"
},
"channel": {
"type": "relation",
"relation": "manyToOne",
"target": "api::channel.channel",
"inversedBy": "messages"
},
"choral": {
"type": "relation",
"relation": "oneToOne",
"target": "api::choral.choral"
}
}
}

View File

@@ -0,0 +1,14 @@
/**
* message controller
*/
import { factories } from "@strapi/strapi";
export default factories.createCoreController(
"api::message.message",
({ strapi }) => ({
async create(ctx) {
return super.create(ctx);
},
})
);

View File

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

View File

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