Merge pull request #327 from mt21625457/main

feat(usage): 添加清理任务与统计过滤
This commit is contained in:
Wesley Liddick
2026-01-19 09:18:00 +08:00
committed by GitHub
67 changed files with 10570 additions and 64 deletions

View File

@@ -633,6 +633,7 @@ export interface UsageLog {
actual_cost: number
rate_multiplier: number
account_rate_multiplier?: number | null
billing_type: number
stream: boolean
duration_ms: number
@@ -657,6 +658,33 @@ export interface UsageLog {
subscription?: UserSubscription
}
export interface UsageCleanupFilters {
start_time: string
end_time: string
user_id?: number
api_key_id?: number
account_id?: number
group_id?: number
model?: string | null
stream?: boolean | null
billing_type?: number | null
}
export interface UsageCleanupTask {
id: number
status: string
filters: UsageCleanupFilters
created_by: number
deleted_rows: number
error_message?: string | null
canceled_by?: number | null
canceled_at?: string | null
started_at?: string | null
finished_at?: string | null
created_at: string
updated_at: string
}
export interface RedeemCode {
id: number
code: string
@@ -880,6 +908,7 @@ export interface UsageQueryParams {
group_id?: number
model?: string
stream?: boolean
billing_type?: number | null
start_date?: string
end_date?: string
}