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: