feat: 图片生成计费功能
- 新增 Group 图片价格配置(image_price_1k/2k/4k) - BillingService 新增 CalculateImageCost 方法 - AntigravityGatewayService 支持识别图片生成模型并按次计费 - UsageLog 新增 image_count 和 image_size 字段 - 前端分组管理支持配置图片价格(antigravity 和 gemini 平台) - 图片计费复用通用计费能力(余额检查、扣费、倍率、订阅限额)
This commit is contained in:
@@ -239,6 +239,10 @@ export interface Group {
|
||||
daily_limit_usd: number | null
|
||||
weekly_limit_usd: number | null
|
||||
monthly_limit_usd: number | null
|
||||
// 图片生成计费配置(仅 antigravity 平台使用)
|
||||
image_price_1k: number | null
|
||||
image_price_2k: number | null
|
||||
image_price_4k: number | null
|
||||
account_count?: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
@@ -537,6 +541,11 @@ export interface UsageLog {
|
||||
stream: boolean
|
||||
duration_ms: number
|
||||
first_token_ms: number | null
|
||||
|
||||
// 图片生成字段
|
||||
image_count: number
|
||||
image_size: string | null
|
||||
|
||||
created_at: string
|
||||
|
||||
user?: User
|
||||
|
||||
Reference in New Issue
Block a user