CI / go-test (push) Canceled after 0s
CI / postgres-durable-first (push) Canceled after 0s
CI / codegen (push) Canceled after 0s
CI / govulncheck (push) Canceled after 0s
CI / race (push) Canceled after 0s
CI / fuzz-smoke (push) Canceled after 0s
CI / golangci (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CodeQL Advanced / Analyze (go) (push) Canceled after 0s
CodeQL Advanced / Analyze (actions) (push) Canceled after 0s
CodeQL Advanced / Analyze (javascript-typescript) (push) Canceled after 0s
Docs CI / build (push) Canceled after 0s
Docs Deploy (GitHub Pages) / build (push) Canceled after 0s
Release 3X-UI / build (386) (push) Canceled after 0s
Release 3X-UI / build (amd64) (push) Canceled after 0s
Release 3X-UI / build (arm64) (push) Canceled after 0s
Release 3X-UI / build (armv5) (push) Canceled after 0s
Release 3X-UI / build (armv6) (push) Canceled after 0s
Release 3X-UI / build (armv7) (push) Canceled after 0s
Release 3X-UI / build (s390x) (push) Canceled after 0s
Release 3X-UI / Build for Windows (amd64) (push) Canceled after 0s
Deploy Smoke Tests / noninteractive-install (ubuntu-24.04-arm) (push) Canceled after 0s
Deploy Smoke Tests / noninteractive-install (ubuntu-latest) (push) Canceled after 0s
Deploy Smoke Tests / release-tag-install (ubuntu-24.04-arm) (push) Canceled after 0s
Deploy Smoke Tests / release-tag-install (ubuntu-latest) (push) Canceled after 0s
Docs Deploy (GitHub Pages) / deploy (push) Canceled after 0s
Release 3X-UI / Publish rolling dev release (push) Canceled after 0s
27 lines
1.8 KiB
Go
27 lines
1.8 KiB
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" example:"14825"`
|
|
InboundId int `json:"inboundId" form:"inboundId" gorm:"index:idx_client_traffics_inbound" example:"1"`
|
|
Enable bool `json:"enable" form:"enable" example:"true"`
|
|
Email string `json:"email" form:"email" gorm:"unique" example:"user1"`
|
|
UUID string `json:"uuid" form:"uuid" gorm:"-" example:"e18c9a96-71bf-48d4-933f-8b9a46d4290c"`
|
|
SubId string `json:"subId" form:"subId" gorm:"-" example:"i7tvdpeffi0hvvf1"`
|
|
Up int64 `json:"up" form:"up" example:"1048576"`
|
|
Down int64 `json:"down" form:"down" example:"2097152"`
|
|
ExpiryTime int64 `json:"expiryTime" form:"expiryTime" gorm:"index:idx_client_traffics_renew,priority:1" example:"1735689600000"`
|
|
Total int64 `json:"total" form:"total" example:"10737418240"`
|
|
Reset int `json:"reset" form:"reset" gorm:"default:0;index:idx_client_traffics_renew,priority:2" example:"0"`
|
|
// ResetDay renews on that day of each calendar month instead of every
|
|
// Reset days; 0 keeps the interval behaviour.
|
|
ResetDay int `json:"resetDay" form:"resetDay" gorm:"default:0" example:"0"`
|
|
// ResetMax caps how many times auto-renew may fire; 0 means no cap.
|
|
ResetMax int `json:"resetMax" form:"resetMax" gorm:"default:0" example:"0"`
|
|
// ResetCount is how many have fired, so a prepaid plan stops on its own.
|
|
ResetCount int `json:"resetCount" form:"resetCount" gorm:"default:0" example:"0"`
|
|
LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0" example:"1735680000000"`
|
|
LastSubFetch int64 `json:"lastSubFetch" form:"lastSubFetch" gorm:"default:0" example:"1735680000000"`
|
|
}
|