2026-04-16 13:27:00 +08:00

221 lines
5.9 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"summary": [
{
"name": "contract",
"title": "合同表",
"primary": "id"
}
],
"fields": [
{
"name": "id",
"title": "合同ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "合同ID主键"
},
{
"name": "contract_number",
"title": "合同编号",
"type": "str",
"length": 50,
"nullable": "no",
"comments": "合同编号,唯一标识"
},
{
"name": "title",
"title": "合同标题",
"type": "str",
"length": 200,
"nullable": "no",
"comments": "合同标题"
},
{
"name": "party_a",
"title": "甲方",
"type": "str",
"length": 100,
"nullable": "no",
"comments": "甲方(我方)"
},
{
"name": "party_b",
"title": "乙方",
"type": "str",
"length": 100,
"nullable": "no",
"comments": "乙方(对方)"
},
{
"name": "contract_type",
"title": "合同类型",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "合同类型引用appcodes表的id"
},
{
"name": "status",
"title": "合同状态",
"type": "str",
"length": 20,
"nullable": "no",
"default": "draft",
"comments": "合同状态draft-草稿, active-生效, expired-过期, terminated-终止"
},
{
"name": "amount",
"title": "合同金额",
"type": "decimal",
"length": 15,
"dec": 2,
"nullable": "yes",
"comments": "合同金额"
},
{
"name": "start_date",
"title": "开始日期",
"type": "date",
"nullable": "no",
"comments": "合同开始日期"
},
{
"name": "end_date",
"title": "结束日期",
"type": "date",
"nullable": "no",
"comments": "合同结束日期"
},
{
"name": "sign_date",
"title": "签署日期",
"type": "date",
"nullable": "yes",
"comments": "签署日期"
},
{
"name": "owner_id",
"title": "负责人",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "合同负责人引用users表的id"
},
{
"name": "org_id",
"title": "所属组织",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "所属组织引用organization表的id"
},
{
"name": "ai_compliance_result",
"title": "合规检查结果",
"type": "text",
"nullable": "yes",
"comments": "AI合规检查结果"
},
{
"name": "ai_key_dates",
"title": "关键时点",
"type": "text",
"nullable": "yes",
"comments": "AI提取的关键时点JSON数据"
},
{
"name": "payment_terms",
"title": "付款条款",
"type": "text",
"nullable": "yes",
"comments": "付款节点规则,如'30%预付款+50%进度款+20%尾款'"
},
{
"name": "credit_period",
"title": "账期",
"type": "long",
"nullable": "yes",
"comments": "账期天数"
},
{
"name": "penalty_clause",
"title": "违约金条款",
"type": "text",
"nullable": "yes",
"comments": "违约金相关条款"
},
{
"name": "opportunity_id",
"title": "关联商机ID",
"type": "str",
"length": 32,
"nullable": "yes",
"comments": "关联的商机ID"
},
{
"name": "customer_id",
"title": "客户ID",
"type": "str",
"length": 32,
"nullable": "yes",
"comments": "关联的客户ID"
},
{
"name": "tax_rate",
"title": "税率",
"type": "decimal",
"length": 5,
"dec": 4,
"nullable": "yes",
"default": "0.1300",
"comments": "税率默认13%"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"nullable": "no",
"comments": "创建时间"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp",
"nullable": "no",
"comments": "更新时间"
}
],
"indexes": [
{
"name": "idx_contract_number",
"idxtype": "unique",
"idxfields": ["contract_number"]
},
{
"name": "idx_contract_org",
"idxtype": "index",
"idxfields": ["org_id"]
},
{
"name": "idx_contract_status",
"idxtype": "index",
"idxfields": ["status"]
}
],
"codes": [
{
"field": "contract_type",
"table": "appcodes",
"valuefield": "id",
"textfield": "name",
"cond": "id='CONTRACT_TYPE'"
},
{
"field": "owner_id",
"table": "users",
"valuefield": "id",
"textfield": "username"
}
]
}