From c35136bcf176e636763edd0238659250b48c57a2 Mon Sep 17 00:00:00 2001 From: martin <406615373@qq.com> Date: Sat, 25 Jul 2026 19:51:13 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hack/config.example.yaml | 40 +++++++++++++++++++++++++++++ manifest/config/config.example.yaml | 11 ++++++++ 2 files changed, 51 insertions(+) diff --git a/hack/config.example.yaml b/hack/config.example.yaml index 4a4b51c..e9aeb06 100644 --- a/hack/config.example.yaml +++ b/hack/config.example.yaml @@ -19,6 +19,46 @@ gfcli: daoPath: "./internal/dao" doPath: "./internal/model/do" entityPath: "./internal/model/entity" + # 金额 decimal 化:全局 NUMERIC → decimal.Decimal + typeMapping: + decimal: + type: decimal.Decimal + import: github.com/shopspring/decimal + numeric: + type: decimal.Decimal + import: github.com/shopspring/decimal + # 可空金额列 → *decimal.Decimal + fieldMapping: + bil_wallets.warning_threshold: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_pricing.per_request_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.custom_input_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.custom_output_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.per_request_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.custom_cache_read_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.custom_cache_creation_price: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + mdl_tenant_models.discount_ratio: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + api_keys.total_quota: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal + tnt_projects.budget: + type: "*decimal.Decimal" + import: github.com/shopspring/decimal ctrl: - apiPath: "./api" outPath: "./internal/controller" diff --git a/manifest/config/config.example.yaml b/manifest/config/config.example.yaml index 3aafd8c..61ebaf8 100644 --- a/manifest/config/config.example.yaml +++ b/manifest/config/config.example.yaml @@ -32,6 +32,17 @@ database: maxOpen: 100 maxLifetime: "30s" + # 审计日志独立数据库(可选) + # 启用后 aud_request_logs(大模型请求审计)写入独立库,其余审核表仍在主库。 + # 建表脚本见 docs/audit-db-schema.sql,需在审计库手动执行。 + # audit: + # type: "pgsql" + # link: "pgsql:user:pass@tcp(host:port)/team-api-audit?sslmode=disable" + # timezone: "Asia/Shanghai" + # maxIdle: 10 + # maxOpen: 50 + # maxLifetime: "5m" + # Redis redis: default: