mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
Removes the AllTime field from Inbound and ClientTraffic and migrates existing DBs by dropping the all_time columns on startup. The counter duplicated up+down without adding signal, and the per-event accumulator ran on every traffic write. Frontend: drop the All-time column from the inbound list and the client-row table, the All-time row from the client info modal, and the All-Time Total Usage tile from the inbounds summary card. The allTimeTraffic/allTimeTrafficUsage i18n keys are removed across every locale. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
18 lines
890 B
Go
18 lines
890 B
Go
package xray
|
|
|
|
// ClientTraffic represents traffic statistics and limits for a specific client.
|
|
// It tracks upload/download usage, expiry times, and online status for inbound clients.
|
|
type ClientTraffic struct {
|
|
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
|
|
InboundId int `json:"inboundId" form:"inboundId"`
|
|
Enable bool `json:"enable" form:"enable"`
|
|
Email string `json:"email" form:"email" gorm:"unique"`
|
|
UUID string `json:"uuid" form:"uuid" gorm:"-"`
|
|
SubId string `json:"subId" form:"subId" gorm:"-"`
|
|
Up int64 `json:"up" form:"up"`
|
|
Down int64 `json:"down" form:"down"`
|
|
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
|
Total int64 `json:"total" form:"total"`
|
|
Reset int `json:"reset" form:"reset" gorm:"default:0"`
|
|
LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0"`
|
|
}
|