client_traffic.go 941 B

12345678910111213141516171819
  1. package xray
  2. // ClientTraffic represents traffic statistics and limits for a specific client.
  3. // It tracks upload/download usage, expiry times, and online status for inbound clients.
  4. type ClientTraffic struct {
  5. Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
  6. InboundId int `json:"inboundId" form:"inboundId"`
  7. Enable bool `json:"enable" form:"enable"`
  8. Email string `json:"email" form:"email" gorm:"unique"`
  9. UUID string `json:"uuid" form:"uuid" gorm:"-"`
  10. SubId string `json:"subId" form:"subId" gorm:"-"`
  11. Up int64 `json:"up" form:"up"`
  12. Down int64 `json:"down" form:"down"`
  13. AllTime int64 `json:"allTime" form:"allTime"`
  14. ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
  15. Total int64 `json:"total" form:"total"`
  16. Reset int `json:"reset" form:"reset" gorm:"default:0"`
  17. LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0"`
  18. }