From a7c83fadc5e83ee55594d6465c59483a924db0c9 Mon Sep 17 00:00:00 2001 From: ymq Date: Wed, 26 Aug 2026 17:49:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(models):=20=E8=B4=A6=E5=8A=A1=E8=A1=A8?= =?UTF-8?q?=E8=A1=A5=E5=A4=9A=E5=B8=81=E7=A7=8D=E5=AD=97=E6=AE=B5(currency?= =?UTF-8?q?/exchange=5Frate/base=5Famount)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_user_currency 查 account.currency 报 Unknown column——migration SQL 给 5 张账务表 加了多币种列但 models json 未同步。逐表对齐 multi_currency_migration.sql: - account: +currency - bill: +currency +base_amount - bill_detail/ledger/acc_detail: +currency +exchange_rate +base_amount --- models/acc_detail.json | 25 ++++++++++++++++++++++++- models/account.json | 9 ++++++++- models/bill.json | 17 ++++++++++++++++- models/bill_detail.json | 25 ++++++++++++++++++++++++- models/ledger.json | 25 ++++++++++++++++++++++++- 5 files changed, 96 insertions(+), 5 deletions(-) diff --git a/models/acc_detail.json b/models/acc_detail.json index b0d687b..aaa2895 100644 --- a/models/acc_detail.json +++ b/models/acc_detail.json @@ -55,6 +55,29 @@ "length": 18, "dec": 2 }, + { + "name": "currency", + "title": "币种", + "type": "str", + "length": 3, + "nullable": "yes" + }, + { + "name": "exchange_rate", + "title": "汇率", + "type": "double", + "length": 14, + "dec": 6, + "nullable": "yes" + }, + { + "name": "base_amount", + "title": "折本位币金额", + "type": "double", + "length": 20, + "dec": 2, + "nullable": "yes" + }, { "name": "balance", "title": "账户余额", @@ -69,4 +92,4 @@ "length": 32 } ] -} \ No newline at end of file +} diff --git a/models/account.json b/models/account.json index 859b82a..734e7de 100644 --- a/models/account.json +++ b/models/account.json @@ -33,6 +33,13 @@ "type": "str", "length": 32 }, + { + "name": "currency", + "title": "币种", + "type": "str", + "length": 3, + "nullable": "yes" + }, { "name": "subjectid", "title": "科目号", @@ -97,4 +104,4 @@ "textfield": "orgname" } ] -} \ No newline at end of file +} diff --git a/models/bill.json b/models/bill.json index 30f57fd..bfea109 100644 --- a/models/bill.json +++ b/models/bill.json @@ -58,6 +58,21 @@ "length": 18, "dec": 2 }, + { + "name": "currency", + "title": "币种", + "type": "str", + "length": 3, + "nullable": "yes" + }, + { + "name": "base_amount", + "title": "折本位币金额", + "type": "double", + "length": 20, + "dec": 2, + "nullable": "yes" + }, { "name": "bill_date", "title": "账单日期", @@ -75,4 +90,4 @@ "length": 1 } ] -} \ No newline at end of file +} diff --git a/models/bill_detail.json b/models/bill_detail.json index ea799c0..f3e77c1 100644 --- a/models/bill_detail.json +++ b/models/bill_detail.json @@ -63,6 +63,29 @@ "type": "float", "length": 18, "dec": 2 + }, + { + "name": "currency", + "title": "币种", + "type": "str", + "length": 3, + "nullable": "yes" + }, + { + "name": "exchange_rate", + "title": "汇率", + "type": "double", + "length": 14, + "dec": 6, + "nullable": "yes" + }, + { + "name": "base_amount", + "title": "折本位币金额", + "type": "double", + "length": 20, + "dec": 2, + "nullable": "yes" } ] -} \ No newline at end of file +} diff --git a/models/ledger.json b/models/ledger.json index f3d3b16..c679a98 100644 --- a/models/ledger.json +++ b/models/ledger.json @@ -45,6 +45,29 @@ "type": "float", "length": 18, "dec": 2 + }, + { + "name": "currency", + "title": "币种", + "type": "str", + "length": 3, + "nullable": "yes" + }, + { + "name": "exchange_rate", + "title": "汇率", + "type": "double", + "length": 14, + "dec": 6, + "nullable": "yes" + }, + { + "name": "base_amount", + "title": "折本位币金额", + "type": "double", + "length": 20, + "dec": 2, + "nullable": "yes" } ] -} \ No newline at end of file +}