feat(saas): wire llm_routing into account CRUD and auth responses

- Add llm_routing to all list_accounts/get_account SQL queries and JSON responses
- Add llm_routing to UpdateAccountRequest with COALESCE update
- Add llm_routing to AccountPublic struct in auth types
- Wire llm_routing into register (default 'local'), login, and me handlers
- Add llm_routing field to AccountRow, AccountAuthRow, AccountLoginRow model structs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-31 03:21:19 +08:00
parent c9b9c5231b
commit 49abd0fe89
5 changed files with 27 additions and 17 deletions

View File

@@ -14,6 +14,7 @@ pub struct AccountRow {
pub totp_enabled: bool,
pub last_login_at: Option<String>,
pub created_at: String,
pub llm_routing: String,
}
/// accounts 表行 (不含 last_login_at用于 auth/me 等场景)
@@ -27,6 +28,7 @@ pub struct AccountAuthRow {
pub status: String,
pub totp_enabled: bool,
pub created_at: String,
pub llm_routing: String,
}
/// Login 一次性查询行(合并用户信息 + password_hash + totp_secret
@@ -42,6 +44,7 @@ pub struct AccountLoginRow {
pub password_hash: String,
pub totp_secret: Option<String>,
pub created_at: String,
pub llm_routing: String,
}
/// operation_logs 表行