Add announcement

This commit is contained in:
2025-04-25 14:32:29 +02:00
parent d524e765ce
commit 022b18c0f7
12 changed files with 227 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "announcements",
"info": {
"singularName": "announcement",
"pluralName": "announcements",
"displayName": "Announcement",
"description": ""
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"choral": {
"type": "relation",
"relation": "manyToOne",
"target": "api::choral.choral",
"inversedBy": "announcements"
},
"author": {
"type": "relation",
"relation": "manyToOne",
"target": "plugin::users-permissions.user",
"inversedBy": "announcements"
}
}
}

View File

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

View File

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

View File

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

View File

@@ -88,6 +88,12 @@
"relation": "oneToMany",
"target": "api::choral-membership.choral-membership",
"mappedBy": "choral"
},
"announcements": {
"type": "relation",
"relation": "oneToMany",
"target": "api::announcement.announcement",
"mappedBy": "choral"
}
}
}

View File

@@ -0,0 +1,42 @@
{
"kind": "collectionType",
"collectionName": "event_others",
"info": {
"singularName": "event-other",
"pluralName": "event-others",
"displayName": "EventOther"
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"public": {
"type": "boolean"
},
"fromDate": {
"type": "datetime"
},
"toDate": {
"type": "datetime"
},
"type": {
"type": "enumeration",
"enum": [
"concert",
"festival",
"salon",
"symposium",
"concours",
"masterclass",
"atelier vocal",
"conférence",
"répétition",
"sorties"
]
}
}
}

View File

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

View File

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

View File

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

View File

@@ -175,6 +175,12 @@
"relation": "oneToMany",
"target": "api::choral-membership.choral-membership",
"mappedBy": "user"
},
"announcements": {
"type": "relation",
"relation": "oneToMany",
"target": "api::announcement.announcement",
"mappedBy": "author"
}
}
}