cms/entcms/models/cms_sections.json
yumoqing 52f4632dfc feat: 角色权限体系 + 栏目管理
1. 角色体系(owner企业类型):
   - superuser: 超级用户(继承全部权限)
   - webmaster: 内容管理员(CRUD全部内容/分类/栏目/配置/线索)
   - reviewer: 内容审核(查看内容+审批状态更新)
   - supervisor: 主管(只读全部+线索管理+审批)
   - customer-support: 客服(线索查看和更新)
   - anonymous: 匿名用户(公开页面+提交线索)

2. 超级用户初始化脚本(scripts/init_superuser.py)
   - 默认: admin/admin123
   - 自动创建用户+分配owner.superuser角色

3. cms_sections栏目管理表:
   - section_key: 栏目标识(hero/products/cases/news/cta/footer/float)
   - display_config: 展示配置JSON(布局/列数/悬停效果)
   - style_config: 样式配置JSON(颜色/渐变/边框)
   - static_content: 静态内容(Hero标语/产品卡片/CTA文案)
   - is_visible: 显示/隐藏控制
   - sort_order: 栏目排序

4. cms_categories增加display_config字段(分类展示风格)

5. 初始化6个栏目数据(Hero/产品/案例/新闻/页脚/浮动入口)

6. 更新菜单和管理后台增加栏目管理入口
2026-05-27 16:57:00 +08:00

116 lines
2.8 KiB
JSON

{
"summary": [
{
"name": "cms_sections",
"title": "CMS栏目表",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "org_id",
"title": "组织ID",
"type": "str",
"length": 32,
"default": "0"
},
{
"name": "section_key",
"title": "栏目标识(hero/products/cases/news/cta/footer)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "title",
"title": "栏目标题",
"type": "str",
"length": 255,
"nullable": "no"
},
{
"name": "subtitle",
"title": "栏目副标题",
"type": "str",
"length": 255
},
{
"name": "section_type",
"title": "展示类型(hero/cards/grid/list/banner/float)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "content_type",
"title": "关联内容类型(product/case/news/空=静态)",
"type": "str",
"length": 32
},
{
"name": "sort_order",
"title": "排序号",
"type": "int",
"default": "0"
},
{
"name": "is_visible",
"title": "是否显示(1/0)",
"type": "str",
"length": 1,
"default": "1"
},
{
"name": "display_config",
"title": "展示配置JSON",
"type": "text"
},
{
"name": "style_config",
"title": "样式配置JSON",
"type": "text"
},
{
"name": "static_content",
"title": "静态内容(用于hero/cta等固定内容栏目)",
"type": "text"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp"
}
],
"indexes": [
{
"name": "idx_sections_org_key",
"idxtype": "unique",
"idxfields": [
"org_id",
"section_key"
]
},
{
"name": "idx_sections_sort",
"idxtype": "index",
"idxfields": [
"sort_order"
]
}
],
"codes": []
}