mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 10:27:46 +08:00
feat(wallet): 钱包系统替代配额系统,新增支付与退款机制
- 新增钱包余额管理、充值、扣费、退款完整流程 - 新增支付网关抽象层(支持手动/支付宝/微信) - 用量计费从配额系统迁移到钱包余额扣费 - 新增管理员钱包管理与支付订单管理页面 - 新增用户钱包中心页面 - 移除独立 Key 锁定机制,统一由钱包余额控制 - 新增相关 API 路由、序列化器与数据库迁移 - 新增钱包、支付、退款相关测试
This commit is contained in:
@@ -89,15 +89,30 @@ export interface AuthSettingsResponse {
|
||||
ldap_exclusive: boolean
|
||||
}
|
||||
|
||||
export interface BillingSummary {
|
||||
id?: string | null
|
||||
balance: number
|
||||
recharge_balance: number
|
||||
gift_balance: number
|
||||
refundable_balance: number
|
||||
currency: string
|
||||
status: string
|
||||
limit_mode: 'finite' | 'unlimited'
|
||||
unlimited: boolean
|
||||
total_recharged: number
|
||||
total_consumed: number
|
||||
total_refunded: number
|
||||
total_adjusted: number
|
||||
updated_at?: string | null
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string // UUID
|
||||
username: string
|
||||
email?: string
|
||||
role: string // 'admin' or 'user'
|
||||
is_active: boolean
|
||||
quota_usd?: number | null
|
||||
used_usd?: number
|
||||
total_usd?: number
|
||||
billing?: BillingSummary
|
||||
allowed_providers?: string[] | null // 允许使用的提供商 ID 列表
|
||||
allowed_api_formats?: string[] | null // 允许使用的 API 格式列表
|
||||
allowed_models?: string[] | null // 允许使用的模型名称列表
|
||||
|
||||
Reference in New Issue
Block a user