feat: add media supply billing center
This commit is contained in:
@@ -70,6 +70,60 @@ export interface OpsMediaSupplyWalletsParams {
|
||||
page_size?: number
|
||||
}
|
||||
|
||||
export interface OpsMediaSupplyBillingEntry {
|
||||
id: number
|
||||
tenant_id: number
|
||||
tenant_name?: string | null
|
||||
user_id: number
|
||||
user_name?: string | null
|
||||
user_phone?: string | null
|
||||
order_id?: number | null
|
||||
order_title?: string | null
|
||||
order_status?: string | null
|
||||
external_order_code?: string | null
|
||||
delta_cents: number
|
||||
balance_after_cents: number
|
||||
reason: string
|
||||
note?: string | null
|
||||
sales_cents: number
|
||||
cost_cents: number
|
||||
gross_profit_cents: number
|
||||
created_by?: number | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface OpsMediaSupplyBillingSummary {
|
||||
total_entries: number
|
||||
total_sales_cents: number
|
||||
total_cost_cents: number
|
||||
gross_profit_cents: number
|
||||
net_wallet_delta_cents: number
|
||||
order_debit_cents: number
|
||||
order_refund_cents: number
|
||||
recharge_cents: number
|
||||
manual_adjustment_cents: number
|
||||
}
|
||||
|
||||
export interface OpsMediaSupplyBillingsResponse {
|
||||
items: OpsMediaSupplyBillingEntry[]
|
||||
total: number
|
||||
page: number
|
||||
size: number
|
||||
summary: OpsMediaSupplyBillingSummary
|
||||
}
|
||||
|
||||
export interface OpsMediaSupplyBillingsParams {
|
||||
keyword?: string
|
||||
tenant_id?: number
|
||||
user_id?: number
|
||||
order_id?: number
|
||||
reason?: string
|
||||
start_at?: string
|
||||
end_at?: string
|
||||
page?: number
|
||||
page_size?: number
|
||||
}
|
||||
|
||||
export const opsMediaSupplyApi = {
|
||||
listResources(params: OpsMediaSupplyResourcesParams) {
|
||||
return http.get<OpsMediaSupplyResourcesResponse>(
|
||||
@@ -107,6 +161,12 @@ export const opsMediaSupplyApi = {
|
||||
params as Record<string, unknown>,
|
||||
)
|
||||
},
|
||||
listBillings(params: OpsMediaSupplyBillingsParams) {
|
||||
return http.get<OpsMediaSupplyBillingsResponse>(
|
||||
'/media-supply/billings',
|
||||
params as Record<string, unknown>,
|
||||
)
|
||||
},
|
||||
adjustWallet(payload: {
|
||||
tenant_id: number
|
||||
user_id: number
|
||||
|
||||
Reference in New Issue
Block a user