diff --git a/.changeset/ten-poems-shake.md b/.changeset/ten-poems-shake.md new file mode 100644 index 000000000..73709a859 --- /dev/null +++ b/.changeset/ten-poems-shake.md @@ -0,0 +1,5 @@ +--- +"strapi-cms": minor +--- + +Add support for webinars diff --git a/apps/strapi-cms/src/api/webinar-speaker/content-types/webinar-speaker/schema.json b/apps/strapi-cms/src/api/webinar-speaker/content-types/webinar-speaker/schema.json new file mode 100644 index 000000000..0ab974497 --- /dev/null +++ b/apps/strapi-cms/src/api/webinar-speaker/content-types/webinar-speaker/schema.json @@ -0,0 +1,65 @@ +{ + "kind": "collectionType", + "collectionName": "webinar_speakers", + "info": { + "singularName": "webinar-speaker", + "pluralName": "webinar-speakers", + "displayName": "WebinarSpeaker", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "name": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "jobTitle": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "description": { + "type": "blocks", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "avatar": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images" + ], + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "webinars": { + "type": "relation", + "relation": "manyToMany", + "target": "api::webinar.webinar", + "mappedBy": "webinarSpeakers" + } + } +} diff --git a/apps/strapi-cms/src/api/webinar-speaker/controllers/webinar-speaker.ts b/apps/strapi-cms/src/api/webinar-speaker/controllers/webinar-speaker.ts new file mode 100644 index 000000000..5d8492093 --- /dev/null +++ b/apps/strapi-cms/src/api/webinar-speaker/controllers/webinar-speaker.ts @@ -0,0 +1,9 @@ +/** + * webinar-speaker controller + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreController( + 'api::webinar-speaker.webinar-speaker' +); diff --git a/apps/strapi-cms/src/api/webinar-speaker/routes/webinar-speaker.ts b/apps/strapi-cms/src/api/webinar-speaker/routes/webinar-speaker.ts new file mode 100644 index 000000000..f347dde0d --- /dev/null +++ b/apps/strapi-cms/src/api/webinar-speaker/routes/webinar-speaker.ts @@ -0,0 +1,9 @@ +/** + * webinar-speaker router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter( + 'api::webinar-speaker.webinar-speaker' +); diff --git a/apps/strapi-cms/src/api/webinar-speaker/services/webinar-speaker.ts b/apps/strapi-cms/src/api/webinar-speaker/services/webinar-speaker.ts new file mode 100644 index 000000000..6dfc765a8 --- /dev/null +++ b/apps/strapi-cms/src/api/webinar-speaker/services/webinar-speaker.ts @@ -0,0 +1,9 @@ +/** + * webinar-speaker service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService( + 'api::webinar-speaker.webinar-speaker' +); diff --git a/apps/strapi-cms/src/api/webinar/content-types/webinar/schema.json b/apps/strapi-cms/src/api/webinar/content-types/webinar/schema.json new file mode 100644 index 000000000..13088e4fd --- /dev/null +++ b/apps/strapi-cms/src/api/webinar/content-types/webinar/schema.json @@ -0,0 +1,126 @@ +{ + "kind": "collectionType", + "collectionName": "webinars", + "info": { + "singularName": "webinar", + "pluralName": "webinars", + "displayName": "Webinar", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "title": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "coverImage": { + "type": "media", + "multiple": false, + "required": true, + "allowedTypes": [ + "images" + ], + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "slug": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true, + "regex": "^[a-zA-Z0-9-]+$" + }, + "textContent": { + "type": "blocks", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "playerSrc": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "startDatetime": { + "type": "datetime", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "endDatetime": { + "type": "datetime", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "webinarSpeakers": { + "type": "relation", + "relation": "manyToMany", + "target": "api::webinar-speaker.webinar-speaker", + "inversedBy": "webinars" + }, + "isVisibleInList": { + "type": "boolean", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "relatedLinks": { + "type": "component", + "repeatable": false, + "component": "common.related-links", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "subscribeParagraphLabel": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text", + "required": true + } + } +} diff --git a/apps/strapi-cms/src/api/webinar/controllers/webinar.ts b/apps/strapi-cms/src/api/webinar/controllers/webinar.ts new file mode 100644 index 000000000..e23c55a70 --- /dev/null +++ b/apps/strapi-cms/src/api/webinar/controllers/webinar.ts @@ -0,0 +1,7 @@ +/** + * webinar controller + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreController('api::webinar.webinar'); diff --git a/apps/strapi-cms/src/api/webinar/routes/webinar.ts b/apps/strapi-cms/src/api/webinar/routes/webinar.ts new file mode 100644 index 000000000..e272fcac5 --- /dev/null +++ b/apps/strapi-cms/src/api/webinar/routes/webinar.ts @@ -0,0 +1,7 @@ +/** + * webinar router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::webinar.webinar'); diff --git a/apps/strapi-cms/src/api/webinar/services/webinar.ts b/apps/strapi-cms/src/api/webinar/services/webinar.ts new file mode 100644 index 000000000..b49853a4a --- /dev/null +++ b/apps/strapi-cms/src/api/webinar/services/webinar.ts @@ -0,0 +1,7 @@ +/** + * webinar service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::webinar.webinar');