{ "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": "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" } ] }