From 8463bb62f4d8c0102962d0e3ec177c119933e588 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 27 May 2026 13:23:26 +0800 Subject: [PATCH] refactor(models): convert to json format per database-table-definition-spec --- models/financial_vouchers.json | 4 ++- models/payments.json | 4 ++- models/receipt_allocations.json | 4 ++- models/receipts.json | 4 ++- models/receivables.json | 51 +++++++++++++++++++++------------ 5 files changed, 44 insertions(+), 23 deletions(-) diff --git a/models/financial_vouchers.json b/models/financial_vouchers.json index 5fb8fc6..852297b 100644 --- a/models/financial_vouchers.json +++ b/models/financial_vouchers.json @@ -3,7 +3,9 @@ { "name": "financial_vouchers", "title": "财务凭证", - "primary": "id", + "primary": [ + "id" + ], "catelog": "entity" } ], diff --git a/models/payments.json b/models/payments.json index c1ff975..f1bd977 100644 --- a/models/payments.json +++ b/models/payments.json @@ -3,7 +3,9 @@ { "name": "payments", "title": "支出记录", - "primary": "id", + "primary": [ + "id" + ], "catelog": "entity" } ], diff --git a/models/receipt_allocations.json b/models/receipt_allocations.json index bbffb47..b0f19c6 100644 --- a/models/receipt_allocations.json +++ b/models/receipt_allocations.json @@ -3,7 +3,9 @@ { "name": "receipt_allocations", "title": "收款分配", - "primary": "id", + "primary": [ + "id" + ], "catelog": "entity" } ], diff --git a/models/receipts.json b/models/receipts.json index 0642aa4..4588c81 100644 --- a/models/receipts.json +++ b/models/receipts.json @@ -3,7 +3,9 @@ { "name": "receipts", "title": "收款记录", - "primary": "id", + "primary": [ + "id" + ], "catelog": "entity" } ], diff --git a/models/receivables.json b/models/receivables.json index f1bf017..81ee627 100644 --- a/models/receivables.json +++ b/models/receivables.json @@ -3,34 +3,42 @@ "fields": [ { "name": "id", - "type": "varchar(64)", + "type": "str", "not_null": true, - "comment": "主键ID" + "comment": "主键ID", + "length": 64 }, { "name": "order_id", - "type": "varchar(64)", - "comment": "订单ID" + "type": "str", + "comment": "订单ID", + "length": 64 }, { "name": "contract_id", - "type": "varchar(64)", - "comment": "合同ID" + "type": "str", + "comment": "合同ID", + "length": 64 }, { "name": "customer_id", - "type": "varchar(64)", - "comment": "客户ID" + "type": "str", + "comment": "客户ID", + "length": 64 }, { "name": "receivable_amount", - "type": "decimal(15,2)", - "comment": "应收金额" + "type": "double", + "comment": "应收金额", + "length": 15, + "dec": 2 }, { "name": "received_amount", - "type": "decimal(15,2)", - "comment": "已收金额" + "type": "double", + "comment": "已收金额", + "length": 15, + "dec": 2 }, { "name": "due_date", @@ -39,18 +47,21 @@ }, { "name": "status", - "type": "varchar(32)", - "comment": "状态" + "type": "str", + "comment": "状态", + "length": 32 }, { "name": "description", - "type": "varchar(500)", - "comment": "描述" + "type": "str", + "comment": "描述", + "length": 500 }, { "name": "org_id", - "type": "varchar(64)", - "comment": "组织ID" + "type": "str", + "comment": "组织ID", + "length": 64 }, { "name": "created_at", @@ -97,7 +108,9 @@ { "name": "receivables", "title": "应收款项", - "primary": "id", + "primary": [ + "id" + ], "catelog": "entity" } ]