2026-06-21 20:27:13 +03:30
|
|
|
import type { Order } from '@/model/order'
|
|
|
|
|
|
|
|
|
|
export interface DashboardMaster {
|
|
|
|
|
price?: number
|
|
|
|
|
pricem?: number
|
|
|
|
|
update_date?: string
|
|
|
|
|
is_gateway_open?: boolean
|
|
|
|
|
prices?: Array<{ id?: string | number; name?: string; price?: number; profit?: number }>
|
2026-01-24 17:45:54 +03:30
|
|
|
new_customer_major?: number
|
|
|
|
|
new_customer_single?: number
|
|
|
|
|
all_customer_major?: number
|
|
|
|
|
all_customer_single?: number
|
|
|
|
|
archive_customer_major?: number
|
|
|
|
|
archive_customer_single?: number
|
|
|
|
|
all_gold?: number
|
|
|
|
|
all_gold_single?: number
|
2026-06-21 20:27:13 +03:30
|
|
|
await_order?: Order[]
|
|
|
|
|
best_customer?: Array<{ customer_id?: number; amount?: number; customer?: { name?: string; mobile?: string } }>
|
|
|
|
|
best_customer_single?: Array<{ gold?: number; customer?: { name?: string; mobile?: string } }>
|
|
|
|
|
GT_all_customers?: number
|
|
|
|
|
GT_no_login_customers?: number
|
|
|
|
|
GT_no_valid_customers?: number
|
|
|
|
|
GT_active_customers?: number
|
|
|
|
|
GT_deActive_customers?: number
|
|
|
|
|
GT_products_report?: Array<{
|
|
|
|
|
id?: number
|
|
|
|
|
title?: string
|
|
|
|
|
transaction_sum_gold_buy?: number
|
|
|
|
|
total_negative_gold_sell?: number
|
|
|
|
|
total_gold?: number
|
|
|
|
|
}>
|
2026-01-24 17:45:54 +03:30
|
|
|
}
|
|
|
|
|
|
2026-07-23 12:28:48 +03:30
|
|
|
export interface DashboardQuantityProductProfit {
|
|
|
|
|
product_id: number
|
|
|
|
|
title: string
|
|
|
|
|
group_type?: string | null
|
|
|
|
|
/** کارمزد کسرشده از کیف همان محصول (گرم/واحد) */
|
|
|
|
|
grams: number
|
|
|
|
|
value_rial: number
|
|
|
|
|
unit?: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface DashboardDailyProductProfit {
|
|
|
|
|
product_id: number
|
|
|
|
|
title: string
|
|
|
|
|
grams: number
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-10 23:25:40 +03:30
|
|
|
export interface DashboardDailyProfit {
|
|
|
|
|
date: string
|
2026-07-23 12:28:48 +03:30
|
|
|
/** سود فلزی روز: کارمزد کسرشده از فلز (گرم) */
|
2026-07-10 23:25:40 +03:30
|
|
|
profit_gold: number
|
|
|
|
|
/** سود ریالی روز: کارمزد کسرشده از ریال */
|
|
|
|
|
profit_rial: number
|
|
|
|
|
/** سود اختلاف قیمت روز (ریال) */
|
|
|
|
|
spread_rial: number
|
|
|
|
|
order_count: number
|
2026-07-23 12:28:48 +03:30
|
|
|
/** تفکیک سود مقداری بهازای هر محصول در همان روز */
|
|
|
|
|
profit_by_product?: DashboardDailyProductProfit[]
|
2026-07-10 23:25:40 +03:30
|
|
|
}
|
|
|
|
|
|
2026-06-21 20:27:13 +03:30
|
|
|
export interface DashboardFinance {
|
|
|
|
|
fullPriceM1?: number
|
|
|
|
|
fullPriceM2?: number
|
|
|
|
|
fullPriceSood?: number
|
|
|
|
|
fullPriceKarmozd?: number
|
|
|
|
|
fullPriceKaermozd?: number
|
2026-07-02 01:25:29 +03:30
|
|
|
/** سود اختلاف قیمت + کارمزد */
|
2026-07-01 22:28:09 +03:30
|
|
|
totalTradingProfit?: number
|
2026-06-21 20:27:13 +03:30
|
|
|
orderCount?: number
|
|
|
|
|
Gifts?: string
|
|
|
|
|
GiftsPrise?: number
|
|
|
|
|
sumAll?: number
|
2026-07-23 12:28:48 +03:30
|
|
|
/** سود طلایی/فلزی: مجموع کارمزدهای کسرشده از فلز (گرم) */
|
2026-07-10 23:25:40 +03:30
|
|
|
profitGoldGrams?: number
|
|
|
|
|
/** سود ریالی: مجموع کارمزدهای کسرشده از ریال */
|
|
|
|
|
profitRial?: number
|
2026-07-11 22:31:45 +03:30
|
|
|
/** سود ریالی قبل از کسر سندهای تبدیل */
|
|
|
|
|
profitRialGross?: number
|
|
|
|
|
/** سود طلایی قبل از افزودن سندهای تبدیل */
|
|
|
|
|
profitGoldGramsGross?: number
|
|
|
|
|
/** جمع ریالی تبدیلشده به طلا در بازه */
|
|
|
|
|
profitRialConverted?: number
|
|
|
|
|
/** جمع گرم تبدیلشده از سود ریالی در بازه */
|
|
|
|
|
profitGoldConvertedGram?: number
|
2026-07-10 23:25:40 +03:30
|
|
|
/** ارزش ریالی سود طلایی با قیمت روز */
|
|
|
|
|
profitGoldValueRial?: number
|
2026-07-23 12:28:48 +03:30
|
|
|
/** سود کارمزد فلزی بهازای هر محصول مقداری/آبشده */
|
|
|
|
|
profitQuantityProducts?: DashboardQuantityProductProfit[]
|
2026-07-10 23:25:40 +03:30
|
|
|
/** تفکیک روزانهٔ سود طلایی/ریالی */
|
|
|
|
|
daily?: DashboardDailyProfit[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ProfitConversion {
|
|
|
|
|
id: number
|
|
|
|
|
user_id?: number | null
|
|
|
|
|
rial_amount: number
|
|
|
|
|
gram_amount: number
|
|
|
|
|
unit_price: number
|
|
|
|
|
converted_at?: string | null
|
|
|
|
|
description?: string | null
|
|
|
|
|
created_at?: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ProfitConversionsResponse {
|
|
|
|
|
items: ProfitConversion[]
|
|
|
|
|
totalRial: number
|
|
|
|
|
totalGram: number
|
2026-01-24 17:45:54 +03:30
|
|
|
}
|
|
|
|
|
|
2026-06-21 20:27:13 +03:30
|
|
|
export interface DashboardFlowPoint {
|
|
|
|
|
date?: string
|
|
|
|
|
'1'?: number
|
|
|
|
|
'2'?: number
|
|
|
|
|
1?: number
|
|
|
|
|
2?: number
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-21 21:55:54 +03:30
|
|
|
export interface DashboardOrderPeakHour {
|
|
|
|
|
hour: number
|
|
|
|
|
buy: number
|
|
|
|
|
sell: number
|
|
|
|
|
total: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface DashboardOrderPeakHours {
|
|
|
|
|
hours: DashboardOrderPeakHour[]
|
|
|
|
|
peak_hour: number | null
|
|
|
|
|
peak_count: number
|
|
|
|
|
days: number
|
|
|
|
|
total_orders: number
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-21 20:27:13 +03:30
|
|
|
export interface PriceChartPoint {
|
|
|
|
|
timestamp: number
|
|
|
|
|
value: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface DashboardWalletSums {
|
|
|
|
|
gold?: number
|
|
|
|
|
goldToCash?: number
|
|
|
|
|
cash?: number
|
|
|
|
|
cashToCash?: number
|
2026-01-24 17:45:54 +03:30
|
|
|
}
|