Add announcement
This commit is contained in:
34
src/api/announcement/content-types/announcement/schema.json
Normal file
34
src/api/announcement/content-types/announcement/schema.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/announcement/controllers/announcement.ts
Normal file
7
src/api/announcement/controllers/announcement.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* announcement controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::announcement.announcement');
|
||||
7
src/api/announcement/routes/announcement.ts
Normal file
7
src/api/announcement/routes/announcement.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* announcement router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::announcement.announcement');
|
||||
7
src/api/announcement/services/announcement.ts
Normal file
7
src/api/announcement/services/announcement.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* announcement service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::announcement.announcement');
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
src/api/event-other/content-types/event-other/schema.json
Normal file
42
src/api/event-other/content-types/event-other/schema.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/event-other/controllers/event-other.ts
Normal file
7
src/api/event-other/controllers/event-other.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* event-other controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::event-other.event-other');
|
||||
7
src/api/event-other/routes/event-other.ts
Normal file
7
src/api/event-other/routes/event-other.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* event-other router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::event-other.event-other');
|
||||
7
src/api/event-other/services/event-other.ts
Normal file
7
src/api/event-other/services/event-other.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* event-other service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::event-other.event-other');
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user