mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-02 00:30:32 +00:00
fix(payment): group dashboard stats by currency
This commit is contained in:
@@ -222,13 +222,33 @@ export interface CreateOrderResult {
|
||||
jsapi_payload?: WechatJSAPIPayload
|
||||
}
|
||||
|
||||
export type CurrencyAmounts = Record<string, number>
|
||||
|
||||
export interface DailyPaymentStats {
|
||||
date: string
|
||||
amount: CurrencyAmounts
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface PaymentMethodStats {
|
||||
type: string
|
||||
amount: CurrencyAmounts
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface TopUserPaymentStats {
|
||||
user_id: number
|
||||
email: string
|
||||
amount: number
|
||||
}
|
||||
|
||||
export interface DashboardStats {
|
||||
today_amount: number
|
||||
total_amount: number
|
||||
today_amount: CurrencyAmounts
|
||||
total_amount: CurrencyAmounts
|
||||
today_count: number
|
||||
total_count: number
|
||||
avg_amount: number
|
||||
daily_series: { date: string; amount: number; count: number }[]
|
||||
payment_methods: { type: string; amount: number; count: number }[]
|
||||
top_users: { user_id: number; email: string; amount: number }[]
|
||||
avg_amount: CurrencyAmounts
|
||||
daily_series: DailyPaymentStats[]
|
||||
payment_methods: PaymentMethodStats[]
|
||||
top_users: Record<string, TopUserPaymentStats[]>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user