Add: Add a WebSocket connection to monitor the app's online status.
This commit is contained in:
@@ -239,6 +239,12 @@ type CommissionLog struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
||||
type ConnectionRecords struct {
|
||||
CurrentContinuousDays int64 `json:"current_continuous_days"`
|
||||
HistoryContinuousDays int64 `json:"history_continuous_days"`
|
||||
LongestSingleConnection int64 `json:"longest_single_connection"`
|
||||
}
|
||||
|
||||
type Coupon struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@@ -822,6 +828,11 @@ type GetDeviceListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type GetDeviceOnlineStatsResponse struct {
|
||||
WeeklyStats []WeeklyStat `json:"weekly_stats"`
|
||||
ConnectionRecords ConnectionRecords `json:"connection_records"`
|
||||
}
|
||||
|
||||
type GetDocumentDetailRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
}
|
||||
@@ -2734,3 +2745,9 @@ type VmessProtocol struct {
|
||||
Network string `json:"network"`
|
||||
Transport string `json:"transport"`
|
||||
}
|
||||
|
||||
type WeeklyStat struct {
|
||||
Day int `json:"day"`
|
||||
DayName string `json:"day_name"`
|
||||
Hours float64 `json:"hours"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user