client_traffic.go 887 B

123456789101112131415161718
  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. SubId string `json:"subId" form:"subId" gorm:"-"`
  10. Up int64 `json:"up" form:"up"`
  11. Down int64 `json:"down" form:"down"`
  12. AllTime int64 `json:"allTime" form:"allTime"`
  13. ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
  14. Total int64 `json:"total" form:"total"`
  15. Reset int `json:"reset" form:"reset" gorm:"default:0"`
  16. LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0"`
  17. }