Add announcement
This commit is contained in:
@@ -39,4 +39,10 @@ export default () => ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"strapi-v5-plugin-populate-deep": {
|
||||||
|
config: {
|
||||||
|
defaultDepth: 3, // Default is 5
|
||||||
|
skipCreatorFields: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
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",
|
"relation": "oneToMany",
|
||||||
"target": "api::choral-membership.choral-membership",
|
"target": "api::choral-membership.choral-membership",
|
||||||
"mappedBy": "choral"
|
"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",
|
"relation": "oneToMany",
|
||||||
"target": "api::choral-membership.choral-membership",
|
"target": "api::choral-membership.choral-membership",
|
||||||
"mappedBy": "user"
|
"mappedBy": "user"
|
||||||
|
},
|
||||||
|
"announcements": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToMany",
|
||||||
|
"target": "api::announcement.announcement",
|
||||||
|
"mappedBy": "author"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
91
types/generated/contentTypes.d.ts
vendored
91
types/generated/contentTypes.d.ts
vendored
@@ -369,6 +369,42 @@ export interface AdminUser extends Struct.CollectionTypeSchema {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ApiAnnouncementAnnouncement
|
||||||
|
extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'announcements';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'Announcement';
|
||||||
|
pluralName: 'announcements';
|
||||||
|
singularName: 'announcement';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: false;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
author: Schema.Attribute.Relation<
|
||||||
|
'manyToOne',
|
||||||
|
'plugin::users-permissions.user'
|
||||||
|
>;
|
||||||
|
choral: Schema.Attribute.Relation<'manyToOne', 'api::choral.choral'>;
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.String;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::announcement.announcement'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface ApiBoardCardBoardCard extends Struct.CollectionTypeSchema {
|
export interface ApiBoardCardBoardCard extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'board_cards';
|
collectionName: 'board_cards';
|
||||||
info: {
|
info: {
|
||||||
@@ -564,6 +600,10 @@ export interface ApiChoralChoral extends Struct.CollectionTypeSchema {
|
|||||||
'manyToMany',
|
'manyToMany',
|
||||||
'plugin::users-permissions.user'
|
'plugin::users-permissions.user'
|
||||||
>;
|
>;
|
||||||
|
announcements: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::announcement.announcement'
|
||||||
|
>;
|
||||||
boards: Schema.Attribute.Relation<'oneToMany', 'api::board.board'>;
|
boards: Schema.Attribute.Relation<'oneToMany', 'api::board.board'>;
|
||||||
calendar: Schema.Attribute.Relation<'oneToMany', 'api::event.event'>;
|
calendar: Schema.Attribute.Relation<'oneToMany', 'api::event.event'>;
|
||||||
city: Schema.Attribute.String;
|
city: Schema.Attribute.String;
|
||||||
@@ -606,6 +646,51 @@ export interface ApiChoralChoral extends Struct.CollectionTypeSchema {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ApiEventOtherEventOther extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'event_others';
|
||||||
|
info: {
|
||||||
|
displayName: 'EventOther';
|
||||||
|
pluralName: 'event-others';
|
||||||
|
singularName: 'event-other';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: false;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
fromDate: Schema.Attribute.DateTime;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::event-other.event-other'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
public: Schema.Attribute.Boolean;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
toDate: Schema.Attribute.DateTime;
|
||||||
|
type: Schema.Attribute.Enumeration<
|
||||||
|
[
|
||||||
|
'concert',
|
||||||
|
'festival',
|
||||||
|
'salon',
|
||||||
|
'symposium',
|
||||||
|
'concours',
|
||||||
|
'masterclass',
|
||||||
|
'atelier vocal',
|
||||||
|
'conf\u00E9rence',
|
||||||
|
'r\u00E9p\u00E9tition',
|
||||||
|
'sorties',
|
||||||
|
]
|
||||||
|
>;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface ApiEventEvent extends Struct.CollectionTypeSchema {
|
export interface ApiEventEvent extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'events';
|
collectionName: 'events';
|
||||||
info: {
|
info: {
|
||||||
@@ -1127,6 +1212,10 @@ export interface PluginUsersPermissionsUser
|
|||||||
};
|
};
|
||||||
attributes: {
|
attributes: {
|
||||||
address: Schema.Attribute.Text;
|
address: Schema.Attribute.Text;
|
||||||
|
announcements: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::announcement.announcement'
|
||||||
|
>;
|
||||||
avatar: Schema.Attribute.Media<'images'>;
|
avatar: Schema.Attribute.Media<'images'>;
|
||||||
background: Schema.Attribute.Media<
|
background: Schema.Attribute.Media<
|
||||||
'images' | 'files' | 'videos' | 'audios'
|
'images' | 'files' | 'videos' | 'audios'
|
||||||
@@ -1208,12 +1297,14 @@ declare module '@strapi/strapi' {
|
|||||||
'admin::transfer-token': AdminTransferToken;
|
'admin::transfer-token': AdminTransferToken;
|
||||||
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
||||||
'admin::user': AdminUser;
|
'admin::user': AdminUser;
|
||||||
|
'api::announcement.announcement': ApiAnnouncementAnnouncement;
|
||||||
'api::board-card.board-card': ApiBoardCardBoardCard;
|
'api::board-card.board-card': ApiBoardCardBoardCard;
|
||||||
'api::board-list.board-list': ApiBoardListBoardList;
|
'api::board-list.board-list': ApiBoardListBoardList;
|
||||||
'api::board.board': ApiBoardBoard;
|
'api::board.board': ApiBoardBoard;
|
||||||
'api::choral-membership.choral-membership': ApiChoralMembershipChoralMembership;
|
'api::choral-membership.choral-membership': ApiChoralMembershipChoralMembership;
|
||||||
'api::choral-permission.choral-permission': ApiChoralPermissionChoralPermission;
|
'api::choral-permission.choral-permission': ApiChoralPermissionChoralPermission;
|
||||||
'api::choral.choral': ApiChoralChoral;
|
'api::choral.choral': ApiChoralChoral;
|
||||||
|
'api::event-other.event-other': ApiEventOtherEventOther;
|
||||||
'api::event.event': ApiEventEvent;
|
'api::event.event': ApiEventEvent;
|
||||||
'api::permissions-template.permissions-template': ApiPermissionsTemplatePermissionsTemplate;
|
'api::permissions-template.permissions-template': ApiPermissionsTemplatePermissionsTemplate;
|
||||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||||
|
|||||||
Reference in New Issue
Block a user