Feature: 添加Content类型

This commit is contained in:
2025-08-26 07:15:50 +00:00
parent 644c533201
commit 464b5174ca
28 changed files with 1677 additions and 0 deletions

View File

@ -0,0 +1,108 @@
{
"kind": "collectionType",
"collectionName": "productions",
"info": {
"singularName": "production",
"pluralName": "productions",
"displayName": "Production"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true
},
"summary": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"production_type": {
"type": "relation",
"relation": "oneToOne",
"target": "api::production-type.production-type"
},
"cover": {
"type": "media",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"multiple": false,
"allowedTypes": [
"images"
]
},
"production_images": {
"type": "media",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"multiple": true,
"allowedTypes": [
"images"
]
},
"production_details": {
"type": "richtext",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"production_specs": {
"type": "dynamiczone",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"components": [
"production.spec-group"
]
},
"documents": {
"type": "media",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"multiple": true,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
},
"show_in_production_list": {
"type": "boolean",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"default": true
}
}
}

View File

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

View File

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

View File

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