From 2380b3279324c15234d5252d0727f0d001ae8f3c Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Thu, 4 Sep 2025 03:53:57 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0Content=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/app.tsx | 41 ++++ .../extensions/translations/zh-Hans.json | 199 ++++++++++++++++++ .../content-types/homepage/schema.json | 36 ++++ src/api/homepage/controllers/homepage.ts | 7 + src/api/homepage/routes/homepage.ts | 7 + src/api/homepage/services/homepage.ts | 7 + .../production-document/schema.json | 41 ++++ .../controllers/production-document.ts | 7 + .../routes/production-document.ts | 7 + .../services/production-document.ts | 7 + .../content-types/production/schema.json | 12 ++ .../content-types/question/schema.json | 42 ++++ src/api/question/controllers/question.ts | 7 + src/api/question/routes/question.ts | 7 + src/api/question/services/question.ts | 7 + .../content-types/total-document/schema.json | 34 +++ .../controllers/total-document.ts | 7 + .../total-document/routes/total-document.ts | 7 + .../total-document/services/total-document.ts | 7 + types/generated/contentTypes.d.ts | 184 ++++++++++++++++ 20 files changed, 673 insertions(+) create mode 100644 src/admin/app.tsx create mode 100644 src/admin/extensions/translations/zh-Hans.json create mode 100644 src/api/homepage/content-types/homepage/schema.json create mode 100644 src/api/homepage/controllers/homepage.ts create mode 100644 src/api/homepage/routes/homepage.ts create mode 100644 src/api/homepage/services/homepage.ts create mode 100644 src/api/production-document/content-types/production-document/schema.json create mode 100644 src/api/production-document/controllers/production-document.ts create mode 100644 src/api/production-document/routes/production-document.ts create mode 100644 src/api/production-document/services/production-document.ts create mode 100644 src/api/question/content-types/question/schema.json create mode 100644 src/api/question/controllers/question.ts create mode 100644 src/api/question/routes/question.ts create mode 100644 src/api/question/services/question.ts create mode 100644 src/api/total-document/content-types/total-document/schema.json create mode 100644 src/api/total-document/controllers/total-document.ts create mode 100644 src/api/total-document/routes/total-document.ts create mode 100644 src/api/total-document/services/total-document.ts diff --git a/src/admin/app.tsx b/src/admin/app.tsx new file mode 100644 index 0000000..bc901a0 --- /dev/null +++ b/src/admin/app.tsx @@ -0,0 +1,41 @@ +import type { StrapiApp } from '@strapi/strapi/admin'; +import extend_translation_zh_Hans from './extensions/translations/zh-Hans.json'; + +export default { + config: { + locales: [ + // 'ar', + // 'fr', + // 'cs', + // 'de', + // 'dk', + // 'es', + // 'he', + // 'id', + // 'it', + // 'ja', + // 'ko', + // 'ms', + // 'nl', + // 'no', + // 'pl', + // 'pt-BR', + // 'pt', + // 'ru', + // 'sk', + // 'sv', + // 'th', + // 'tr', + // 'uk', + // 'vi', + 'zh-Hans', + // 'zh', + ], + translations: { + 'zh-Hans': extend_translation_zh_Hans, + }, + }, + bootstrap(app: StrapiApp) { + console.log(app); + }, +}; diff --git a/src/admin/extensions/translations/zh-Hans.json b/src/admin/extensions/translations/zh-Hans.json new file mode 100644 index 0000000..a5495de --- /dev/null +++ b/src/admin/extensions/translations/zh-Hans.json @@ -0,0 +1,199 @@ +{ + "HomePage.header.title": "你好 {name}", + "HomePage.header.subtitle": "欢迎使用管理面板", + "HomePage.widget.loading": "正在加载组件内容", + "HomePage.widget.error": "无法加载组件内容。", + "HomePage.widget.no-data": "未找到内容。", + "HomePage.widget.no-permissions": "你没有权限查看此组件", + "Settings.apiTokens.copy.lastWarning": "复制你的 API 令牌", + "Settings.permissions.auditLogs.not-available": "审计日志仅在付费计划中可用。升级以获得所有活动的可搜索和可筛选显示。", + "Settings.profile.form.section.experience.mode.option-system-label": "使用系统设置", + "Settings.sso.not-available": "单点登录(SSO)仅在付费计划中可用。升级以为管理面板配置额外的登录和注册方式。", + "Settings.content-history.title": "内容历史", + "Settings.content-history.description": "更好地控制内容生命周期的每一步。", + "Settings.content-history.not-available": "内容历史仅在付费计划中可用。升级以全面控制内容生命周期。", + "Settings.tokens.copy.title": "令牌", + "Settings.page.PurchaseAudit-logs.description": "与团队一起跟踪和审查更改", + "Settings.page.PurchaseAudit-logs.perks1": "轻松跟踪更改", + "Settings.page.PurchaseAudit-logs.perks2": "轻松审查更改", + "Settings.page.PurchaseAudit-logs.perks3": "维护安全与合规", + "Settings.page.PurchaseContent-history.description": "即时还原内容更改", + "Settings.page.PurchaseContent-history.perks1": "浏览内容历史", + "Settings.page.PurchaseContent-history.perks2": "一键还原更改", + "Settings.page.PurchaseContent-history.perks3": "跨语言跟踪更改", + "Settings.page.PurchaseSSO.description": "简化团队身份验证", + "Settings.page.PurchaseSSO.perks1": "统一身份验证", + "Settings.page.PurchaseSSO.perks2": "增强安全性", + "Settings.page.PurchaseSSO.perks3": "支持 Webhook", + "Settings.page.purchase.upgrade.cta": "升级", + "Settings.page.purchase.learn-more.cta": "了解更多", + "noPreview": "无可用预览", + "app.components.FreeTrialEndedModal.button.downgrade": "降级到社区版", + "app.components.FreeTrialEndedModal.button.upgrade": "继续使用成长计划", + "app.components.FreeTrialEndedModal.description": "你对成长计划功能(如内容历史、发布和单点登录(SSO))的访问已过期。", + "app.components.FreeTrialEndedModal.notice.item1": "降级后将无法访问上述功能。", + "app.components.FreeTrialEndedModal.notice.item2": "文档版本历史将被删除。", + "app.components.FreeTrialEndedModal.notice.item3": "所有发布内容将被清除。", + "app.components.FreeTrialEndedModal.notice.item4": "如果降级,请确保设置根管理员密码以继续访问管理面板。", + "app.components.FreeTrialEndedModal.notice.title": "重要须知:", + "app.components.FreeTrialEndedModal.title": "你的试用已结束", + "app.components.FreeTrialWelcomeModal.button": "开始探索", + "app.components.FreeTrialWelcomeModal.description1": "在接下来的 30 天内,你将可以完全访问高级功能,如内容历史、发布和单点登录(SSO)——尽情体验 Strapi CMS 的强大功能。", + "app.components.FreeTrialWelcomeModal.description2": "利用这段时间自由构建、定制和测试你的内容工作流!", + "app.components.FreeTrialWelcomeModal.title": "很高兴你加入我们", + "app.components.LeftMenu.trialCountdown.endedAt": "你的试用已于 {date} 结束。", + "app.components.LeftMenu.trialCountdown.endsAt": "你的试用将于 {date} 结束。", + "app.components.NpsSurvey.banner-title": "你有多大可能会向朋友或同事推荐 Strapi?", + "app.components.NpsSurvey.feedback-response": "非常感谢你的反馈!", + "app.components.NpsSurvey.feedback-question": "你有什么改进建议吗?", + "app.components.NpsSurvey.submit-feedback": "提交反馈", + "app.components.NpsSurvey.dismiss-survey-label": "关闭调查", + "app.components.NpsSurvey.no-recommendation": "完全不推荐", + "app.components.NpsSurvey.happy-to-recommend": "非常推荐", + "app.components.UpsellBanner.button": "立即升级", + "app.components.UpsellBanner.intro": "访问成长计划功能:", + "app.components.UpsellBanner.text": "作为试用的一部分,你可以体验高级工具,如内容历史、发布和单点登录(SSO)。", + "app.utils.refresh": "刷新", + "app.utils.published": "已发布", + "app.utils.ready-to-publish": "准备发布", + "app.utils.already-published": "已发布", + "app.utils.ready-to-publish-changes": "准备发布更改", + "app.utils.ready-to-unpublish-changes": "准备取消发布", + "app.confirm.body": "你确定吗?", + "components.FilterOptions.FILTER_TYPES.$containsi": "包含(不区分大小写)", + "components.FilterOptions.FILTER_TYPES.$endsWithi": "以...结尾(不区分大小写)", + "components.FilterOptions.FILTER_TYPES.$eqi": "等于(不区分大小写)", + "components.FilterOptions.FILTER_TYPES.$nei": "不等于(不区分大小写)", + "components.FilterOptions.FILTER_TYPES.$notContainsi": "不包含(不区分大小写)", + "components.FilterOptions.FILTER_TYPES.$startsWithi": "以...开头(不区分大小写)", + "components.Input.error.contain.maxBytes": "密码必须小于 73 字节", + "components.Input.error.validation.combobox.invalid": "提供的值无效", + "components.Input.error.validation.string": "这不是有效的字符串。", + "components.Input.error.validation.email.withField": "{field} 不是有效的邮箱", + "components.Input.error.validation.json.withField": "{field} 不符合 JSON 格式", + "components.Input.error.validation.lowercase.withField": "{field} 必须为小写字符串", + "components.Input.error.validation.max.withField": "{field} 太大。", + "components.Input.error.validation.maxLength.withField": "{field} 太长。", + "components.Input.error.validation.min.withField": "{field} 太小。", + "components.Input.error.validation.minLength.withField": "{field} 太短。", + "components.Input.error.validation.minSupMax.withField": "{field} 不能大于最大值", + "components.Input.error.validation.regex.withField": "{field} 不符合正则表达式。", + "components.Input.error.validation.required.withField": "{field} 为必填项。", + "components.Input.error.validation.unique.withField": "{field} 已被使用。", + "components.ViewSettings.tooltip": "查看设置", + "components.Blocks.modifiers.bold": "加粗", + "components.Blocks.modifiers.italic": "斜体", + "components.Blocks.modifiers.underline": "下划线", + "components.Blocks.modifiers.strikethrough": "删除线", + "components.Blocks.modifiers.code": "内联代码", + "components.Blocks.link": "链接", + "components.Blocks.expand": "展开", + "components.Blocks.collapse": "收起", + "components.Blocks.popover.text": "文本", + "components.Blocks.popover.text.placeholder": "输入链接文本", + "components.Blocks.popover.link": "链接", + "components.Blocks.popover.link.placeholder": "粘贴链接", + "components.Blocks.popover.link.error": "请输入有效链接", + "components.Blocks.popover.remove": "移除", + "components.Blocks.popover.edit": "编辑", + "components.Blocks.blocks.selectBlock": "选择区块", + "components.Blocks.blocks.text": "文本", + "components.Blocks.blocks.heading1": "标题 1", + "components.Blocks.blocks.heading2": "标题 2", + "components.Blocks.blocks.heading3": "标题 3", + "components.Blocks.blocks.heading4": "标题 4", + "components.Blocks.blocks.heading5": "标题 5", + "components.Blocks.blocks.heading6": "标题 6", + "components.Blocks.blocks.code": "代码块", + "components.Blocks.blocks.quote": "引用", + "components.Blocks.blocks.image": "图片", + "components.Blocks.blocks.unorderedList": "无序列表", + "components.Blocks.blocks.orderedList": "有序列表", + "components.Blocks.blocks.code.languageLabel": "选择语言", + "components.Blocks.dnd.instruction": "要重新排序区块,请按住 Command 或 Control 键,同时按 Shift 和上下箭头", + "components.Blocks.dnd.reorder": "{item},已移动。编辑器中的新位置:{position}。", + "components.Wysiwyg.blocks.code": "代码", + "components.premiumFeature.title": "高级功能", + "global.home": "首页", + "global.error": "发生错误", + "global.last-change.redo": "重做上次更改", + "global.last-change.undo": "撤销上次更改", + "global.last-changes.discard": "放弃上次更改", + "global.more": "更多", + "global.new": "新建", + "global.profile.settings": "个人设置", + "global.fullname": "{firstname} {lastname}", + "global.learn-more": "了解更多", + "tours.contentTypeBuilder.Introduction.title": "欢迎使用内容类型构建器!", + "tours.contentTypeBuilder.Introduction.content": "在这里,你可以通过集合类型、单一类型和可复用组件来创建和管理应用结构。让我们开始吧!", + "tours.contentTypeBuilder.CollectionTypes.title": "集合类型", + "tours.contentTypeBuilder.CollectionTypes.content": "用于管理多条数据——如博客文章或产品。", + "tours.contentTypeBuilder.SingleTypes.title": "单一类型", + "tours.contentTypeBuilder.SingleTypes.content": "适用于首页或站点设置等唯一数据。", + "tours.contentTypeBuilder.Components.title": "组件", + "tours.contentTypeBuilder.Components.content": "一次构建,到处复用。适用于按钮、卡片或滑块等。", + "tours.contentTypeBuilder.YourTurn.title": "轮到你了——开始构建吧!", + "tours.contentTypeBuilder.YourTurn.content": "创建集合类型或单一类型。点击“+”按钮,输入名称,点击“继续”,我们会引导你完成。", + "tours.contentTypeBuilder.AddFields.title": "添加字段让内容更丰富", + "tours.contentTypeBuilder.AddFields.content": "先添加第一个字段——如名称、图片或关联。内容类型需要结构才能存储内容。", + "tours.contentTypeBuilder.Save.title": "别忘了保存!", + "tours.contentTypeBuilder.Save.content": "点击“保存”按钮锁定内容类型,避免丢失。快完成了!", + "tours.contentTypeBuilder.Finish.title": "第一步完成!🎉", + "tours.contentTypeBuilder.Finish.content": "你已创建第一个内容类型!现在前往内容管理器添加数据吧!", + "tours.apiTokens.Introduction.title": "最后,API 令牌", + "tours.apiTokens.Introduction.content": "通过高度可定制的权限控制 API 访问。", + "tours.apiTokens.ManageAPIToken.title": "管理 API 令牌", + "tours.apiTokens.ManageAPIToken.content": "点击“铅笔”图标查看和更新现有 API 令牌。", + "tours.apiTokens.ViewAPIToken.title": "查看 API 令牌", + "tours.apiTokens.ViewAPIToken.content": "点击“查看令牌”按钮查看你的 API 令牌。", + "tours.apiTokens.CopyAPIToken.title": "复制 API 令牌", + "tours.apiTokens.CopyAPIToken.content": "点击“复制”按钮保存 API 令牌,后续请求需要用到。{spacer} 还有疑问?了解 API 令牌。", + "tours.apiTokens.FinalStep.title": "恭喜,可以部署应用了!", + "tours.apiTokens.FinalStep.content": "你已具备部署应用和分享内容的全部条件。", + "tours.contentManager.Introduction.title": "内容管理器", + "tours.contentManager.Introduction.content": "通过集合类型和单一类型创建和管理内容。", + "tours.contentManager.CreateNewEntry.title": "新建条目", + "tours.contentManager.CreateNewEntry.content": "点击“新建条目”按钮,为该集合类型创建并发布新条目。", + "tours.contentManager.Fields.title": "字段", + "tours.contentManager.Fields.content": "首先填写你在内容类型构建器中创建的字段。", + "tours.contentManager.Publish.title": "发布", + "tours.contentManager.Publish.content": "然后点击“发布”按钮,通过内容 API 提供内容。", + "tours.contentManager.FinalStep.title": "该设置 API 令牌了!", + "tours.contentManager.FinalStep.content": "你已创建并发布条目,现在设置 API 令牌以管理内容访问。", + "tours.stepCount": "第 {currentStep} 步,共 {tourLength} 步", + "tours.skip": "跳过", + "tours.next": "下一步", + "tours.gotIt": "知道了", + "tours.overview.title": "发现你的应用!", + "tours.overview.subtitle": "跟随引导,充分利用 Strapi。", + "tours.overview.close": "关闭引导", + "tours.overview.tasks": "你的任务", + "tours.overview.contentTypeBuilder.label": "创建数据结构", + "tours.overview.contentManager.label": "创建并发布内容", + "tours.overview.apiTokens.label": "复制 API 令牌", + "tours.overview.strapiCloud.label": "部署到 Strapi Cloud", + "tours.overview.strapiCloud.link": "阅读文档", + "tours.overview.tour.link": "开始", + "tours.overview.tour.done": "完成", + "tours.overview.close.description": "确定要关闭引导吗?", + "tours.profile.title": "引导", + "tours.profile.description": "你可以随时重置引导。", + "tours.profile.reset": "重置引导", + "tours.profile.notification.success.reset": "引导已重置", + "tours.overview.completed": "已完成 {completed}%", + "widget.key-statistics.title": "项目统计", + "widget.key-statistics.list.admins": "管理员", + "widget.key-statistics.list.apiTokens": "API 令牌", + "widget.key-statistics.list.assets": "资源", + "widget.key-statistics.list.components": "组件", + "widget.key-statistics.list.contentTypes": "内容类型", + "widget.key-statistics.list.entries": "条目", + "widget.key-statistics.list.locales": "语言", + "widget.key-statistics.list.webhooks": "Webhook", + "widget.last-activity.link": "打开审计日志", + "widget.last-activity.no-activity": "无活动", + "widget.last-activity.title": "最近活动", + "widget.profile.title": "个人资料", + "content-manager.plugin.name": "内容管理器", + "content-type-builder.plugin.name": "内容类型构建器" +} \ No newline at end of file diff --git a/src/api/homepage/content-types/homepage/schema.json b/src/api/homepage/content-types/homepage/schema.json new file mode 100644 index 0000000..51319a3 --- /dev/null +++ b/src/api/homepage/content-types/homepage/schema.json @@ -0,0 +1,36 @@ +{ + "kind": "singleType", + "collectionName": "homepages", + "info": { + "singularName": "homepage", + "pluralName": "homepages", + "displayName": "Homepage" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "carousel": { + "type": "media", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "multiple": true, + "allowedTypes": [ + "images" + ] + }, + "recommend_productions": { + "type": "relation", + "relation": "oneToMany", + "target": "api::production.production" + } + } +} diff --git a/src/api/homepage/controllers/homepage.ts b/src/api/homepage/controllers/homepage.ts new file mode 100644 index 0000000..c566508 --- /dev/null +++ b/src/api/homepage/controllers/homepage.ts @@ -0,0 +1,7 @@ +/** + * homepage controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::homepage.homepage'); diff --git a/src/api/homepage/routes/homepage.ts b/src/api/homepage/routes/homepage.ts new file mode 100644 index 0000000..14e14f2 --- /dev/null +++ b/src/api/homepage/routes/homepage.ts @@ -0,0 +1,7 @@ +/** + * homepage router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::homepage.homepage'); diff --git a/src/api/homepage/services/homepage.ts b/src/api/homepage/services/homepage.ts new file mode 100644 index 0000000..4369109 --- /dev/null +++ b/src/api/homepage/services/homepage.ts @@ -0,0 +1,7 @@ +/** + * homepage service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::homepage.homepage'); diff --git a/src/api/production-document/content-types/production-document/schema.json b/src/api/production-document/content-types/production-document/schema.json new file mode 100644 index 0000000..4bd1b47 --- /dev/null +++ b/src/api/production-document/content-types/production-document/schema.json @@ -0,0 +1,41 @@ +{ + "kind": "collectionType", + "collectionName": "production_documents", + "info": { + "singularName": "production-document", + "pluralName": "production-documents", + "displayName": "Production Document" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "document": { + "type": "media", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "multiple": false, + "required": true, + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ] + }, + "related_productions": { + "type": "relation", + "relation": "manyToMany", + "target": "api::production.production", + "inversedBy": "production_documents" + } + } +} diff --git a/src/api/production-document/controllers/production-document.ts b/src/api/production-document/controllers/production-document.ts new file mode 100644 index 0000000..6e369cd --- /dev/null +++ b/src/api/production-document/controllers/production-document.ts @@ -0,0 +1,7 @@ +/** + * production-document controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::production-document.production-document'); diff --git a/src/api/production-document/routes/production-document.ts b/src/api/production-document/routes/production-document.ts new file mode 100644 index 0000000..481d877 --- /dev/null +++ b/src/api/production-document/routes/production-document.ts @@ -0,0 +1,7 @@ +/** + * production-document router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::production-document.production-document'); diff --git a/src/api/production-document/services/production-document.ts b/src/api/production-document/services/production-document.ts new file mode 100644 index 0000000..8fa416a --- /dev/null +++ b/src/api/production-document/services/production-document.ts @@ -0,0 +1,7 @@ +/** + * production-document service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::production-document.production-document'); diff --git a/src/api/production/content-types/production/schema.json b/src/api/production/content-types/production/schema.json index 9b18d09..eeef0db 100644 --- a/src/api/production/content-types/production/schema.json +++ b/src/api/production/content-types/production/schema.json @@ -80,6 +80,18 @@ "production.spec-group" ] }, + "questions": { + "type": "relation", + "relation": "manyToMany", + "target": "api::question.question", + "inversedBy": "productions" + }, + "production_documents": { + "type": "relation", + "relation": "manyToMany", + "target": "api::production-document.production-document", + "mappedBy": "related_productions" + }, "documents": { "type": "media", "pluginOptions": { diff --git a/src/api/question/content-types/question/schema.json b/src/api/question/content-types/question/schema.json new file mode 100644 index 0000000..c437ca8 --- /dev/null +++ b/src/api/question/content-types/question/schema.json @@ -0,0 +1,42 @@ +{ + "kind": "collectionType", + "collectionName": "questions", + "info": { + "singularName": "question", + "pluralName": "questions", + "displayName": "Question" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "title": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "content": { + "type": "richtext", + "pluginOptions": { + "i18n": { + "localized": true + } + } + }, + "productions": { + "type": "relation", + "relation": "manyToMany", + "target": "api::production.production", + "mappedBy": "questions" + } + } +} diff --git a/src/api/question/controllers/question.ts b/src/api/question/controllers/question.ts new file mode 100644 index 0000000..c47bea1 --- /dev/null +++ b/src/api/question/controllers/question.ts @@ -0,0 +1,7 @@ +/** + * question controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::question.question'); diff --git a/src/api/question/routes/question.ts b/src/api/question/routes/question.ts new file mode 100644 index 0000000..8276310 --- /dev/null +++ b/src/api/question/routes/question.ts @@ -0,0 +1,7 @@ +/** + * question router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::question.question'); diff --git a/src/api/question/services/question.ts b/src/api/question/services/question.ts new file mode 100644 index 0000000..767554c --- /dev/null +++ b/src/api/question/services/question.ts @@ -0,0 +1,7 @@ +/** + * question service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::question.question'); diff --git a/src/api/total-document/content-types/total-document/schema.json b/src/api/total-document/content-types/total-document/schema.json new file mode 100644 index 0000000..67bc79b --- /dev/null +++ b/src/api/total-document/content-types/total-document/schema.json @@ -0,0 +1,34 @@ +{ + "kind": "singleType", + "collectionName": "total_documents", + "info": { + "singularName": "total-document", + "pluralName": "total-documents", + "displayName": "TotalDocument" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "documents": { + "type": "media", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "multiple": true, + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ] + } + } +} diff --git a/src/api/total-document/controllers/total-document.ts b/src/api/total-document/controllers/total-document.ts new file mode 100644 index 0000000..a7ad60a --- /dev/null +++ b/src/api/total-document/controllers/total-document.ts @@ -0,0 +1,7 @@ +/** + * total-document controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::total-document.total-document'); diff --git a/src/api/total-document/routes/total-document.ts b/src/api/total-document/routes/total-document.ts new file mode 100644 index 0000000..3958c52 --- /dev/null +++ b/src/api/total-document/routes/total-document.ts @@ -0,0 +1,7 @@ +/** + * total-document router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::total-document.total-document'); diff --git a/src/api/total-document/services/total-document.ts b/src/api/total-document/services/total-document.ts new file mode 100644 index 0000000..b4f4f5b --- /dev/null +++ b/src/api/total-document/services/total-document.ts @@ -0,0 +1,7 @@ +/** + * total-document service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::total-document.total-document'); diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index d87d602..1cf5923 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -448,6 +448,90 @@ export interface ApiContactInfoContactInfo extends Struct.SingleTypeSchema { }; } +export interface ApiHomepageHomepage extends Struct.SingleTypeSchema { + collectionName: 'homepages'; + info: { + displayName: 'Homepage'; + pluralName: 'homepages'; + singularName: 'homepage'; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + carousel: Schema.Attribute.Media<'images', true> & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'api::homepage.homepage' + >; + publishedAt: Schema.Attribute.DateTime; + recommend_productions: Schema.Attribute.Relation< + 'oneToMany', + 'api::production.production' + >; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface ApiProductionDocumentProductionDocument + extends Struct.CollectionTypeSchema { + collectionName: 'production_documents'; + info: { + displayName: 'Production Document'; + pluralName: 'production-documents'; + singularName: 'production-document'; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + document: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'> & + Schema.Attribute.Required & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + locale: Schema.Attribute.String; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'api::production-document.production-document' + >; + publishedAt: Schema.Attribute.DateTime; + related_productions: Schema.Attribute.Relation< + 'manyToMany', + 'api::production.production' + >; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + export interface ApiProductionTypeProductionType extends Struct.CollectionTypeSchema { collectionName: 'production_types'; @@ -532,6 +616,10 @@ export interface ApiProductionProduction extends Struct.CollectionTypeSchema { localized: true; }; }>; + production_documents: Schema.Attribute.Relation< + 'manyToMany', + 'api::production-document.production-document' + >; production_images: Schema.Attribute.Media<'images', true> & Schema.Attribute.SetPluginOptions<{ i18n: { @@ -549,6 +637,10 @@ export interface ApiProductionProduction extends Struct.CollectionTypeSchema { 'api::production-type.production-type' >; publishedAt: Schema.Attribute.DateTime; + questions: Schema.Attribute.Relation< + 'manyToMany', + 'api::question.question' + >; show_in_production_list: Schema.Attribute.Boolean & Schema.Attribute.SetPluginOptions<{ i18n: { @@ -575,6 +667,54 @@ export interface ApiProductionProduction extends Struct.CollectionTypeSchema { }; } +export interface ApiQuestionQuestion extends Struct.CollectionTypeSchema { + collectionName: 'questions'; + info: { + displayName: 'Question'; + pluralName: 'questions'; + singularName: 'question'; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + content: Schema.Attribute.RichText & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'api::question.question' + >; + productions: Schema.Attribute.Relation< + 'manyToMany', + 'api::production.production' + >; + publishedAt: Schema.Attribute.DateTime; + title: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + export interface ApiSolutionTypeSolutionType extends Struct.CollectionTypeSchema { collectionName: 'solution_types'; @@ -674,6 +814,46 @@ export interface ApiSolutionSolution extends Struct.CollectionTypeSchema { }; } +export interface ApiTotalDocumentTotalDocument extends Struct.SingleTypeSchema { + collectionName: 'total_documents'; + info: { + displayName: 'TotalDocument'; + pluralName: 'total-documents'; + singularName: 'total-document'; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + documents: Schema.Attribute.Media< + 'images' | 'files' | 'videos' | 'audios', + true + > & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + locale: Schema.Attribute.String; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'api::total-document.total-document' + >; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + export interface PluginContentReleasesRelease extends Struct.CollectionTypeSchema { collectionName: 'strapi_releases'; @@ -1185,10 +1365,14 @@ declare module '@strapi/strapi' { 'admin::user': AdminUser; 'api::company-profile.company-profile': ApiCompanyProfileCompanyProfile; 'api::contact-info.contact-info': ApiContactInfoContactInfo; + 'api::homepage.homepage': ApiHomepageHomepage; + 'api::production-document.production-document': ApiProductionDocumentProductionDocument; 'api::production-type.production-type': ApiProductionTypeProductionType; 'api::production.production': ApiProductionProduction; + 'api::question.question': ApiQuestionQuestion; 'api::solution-type.solution-type': ApiSolutionTypeSolutionType; 'api::solution.solution': ApiSolutionSolution; + 'api::total-document.total-document': ApiTotalDocumentTotalDocument; 'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; 'plugin::i18n.locale': PluginI18NLocale;