cms/models/cms_leads.json
Hermes Agent 4495e9589b refactor: 从独立webapp重构为纯Sage模块
- cms/: Python包(合并原entcms+dingdingflow)
  - init.py: 791行,load_cms()注册所有CRUD+审批函数
  - dingtalk_client.py: 钉钉API客户端
- models/: 7个表定义JSON(5个CMS+2个DD)
- json/: 7个CRUD定义JSON
- wwwroot/: 管理后台CRUD页面和API(37个dspy)
- init/data.yaml: 模块初始数据(appcodes/appcodes_kv/分类/栏目/配置)
- scripts/load_path.py: RBAC权限配置
- pyproject.toml: pip-installable包定义
- 删除: app/, conf/, build.sh, entcms/, dingdingflow/等webapp文件
- 数据库访问统一为DBPools()+_get_dbname()动态模式
2026-06-15 11:06:11 +08:00

138 lines
3.1 KiB
JSON

{
"summary": [
{
"name": "cms_leads",
"title": "商机线索表",
"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": "source",
"title": "来源(website/phone/referral/ai_extract)",
"type": "str",
"length": 32
},
{
"name": "name",
"title": "联系人姓名",
"type": "str",
"length": 100
},
{
"name": "company",
"title": "公司名称",
"type": "str",
"length": 200
},
{
"name": "phone",
"title": "联系电话",
"type": "str",
"length": 32
},
{
"name": "email",
"title": "邮箱",
"type": "str",
"length": 100
},
{
"name": "industry",
"title": "所属行业",
"type": "str",
"length": 100
},
{
"name": "region",
"title": "地区",
"type": "str",
"length": 100
},
{
"name": "interest_products",
"title": "感兴趣的产品",
"type": "str",
"length": 500
},
{
"name": "message",
"title": "留言内容",
"type": "text"
},
{
"name": "raw_text",
"title": "原始文本(AI抽取用)",
"type": "text"
},
{
"name": "status",
"title": "状态(new/contacted/qualified/converted/closed)",
"type": "str",
"length": 32,
"default": "new"
},
{
"name": "assigned_to",
"title": "负责人",
"type": "str",
"length": 32
},
{
"name": "notes",
"title": "跟进备注",
"type": "text"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp"
}
],
"indexes": [
{
"name": "idx_leads_org_status",
"idxtype": "index",
"idxfields": [
"org_id",
"status"
]
},
{
"name": "idx_leads_source",
"idxtype": "index",
"idxfields": [
"source"
]
},
{
"name": "idx_leads_assigned",
"idxtype": "index",
"idxfields": [
"assigned_to"
]
}
]
}