feat(usage): add account cost to breakdown sub-table and admin usage log

- UserBreakdownItem: add AccountCost field + SQL aggregation
- UserBreakdownSubTable: add orange account cost column
- Admin usage table: add account_cost column (after cost, default visible)
- Column settings: add account_cost toggle option
This commit is contained in:
erio
2026-04-15 15:31:55 +08:00
parent e0b12b7512
commit db27e8f000
6 changed files with 17 additions and 3 deletions

View File

@@ -168,8 +168,9 @@ type UserBreakdownItem struct {
Email string `json:"email"`
Requests int64 `json:"requests"`
TotalTokens int64 `json:"total_tokens"`
Cost float64 `json:"cost"` // 标准计费
ActualCost float64 `json:"actual_cost"` // 实际扣除
Cost float64 `json:"cost"` // 标准计费
ActualCost float64 `json:"actual_cost"` // 实际扣除
AccountCost float64 `json:"account_cost"` // 账号成本
}
// UserBreakdownDimension specifies the dimension to filter for user breakdown.