client_traffic.go 1.1 KB

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" example:"14825"`
  6. InboundId int `json:"inboundId" form:"inboundId" example:"1"`
  7. Enable bool `json:"enable" form:"enable" example:"true"`
  8. Email string `json:"email" form:"email" gorm:"unique" example:"user1"`
  9. UUID string `json:"uuid" form:"uuid" gorm:"-" example:"e18c9a96-71bf-48d4-933f-8b9a46d4290c"`
  10. SubId string `json:"subId" form:"subId" gorm:"-" example:"i7tvdpeffi0hvvf1"`
  11. Up int64 `json:"up" form:"up" example:"1048576"`
  12. Down int64 `json:"down" form:"down" example:"2097152"`
  13. ExpiryTime int64 `json:"expiryTime" form:"expiryTime" example:"1735689600000"`
  14. Total int64 `json:"total" form:"total" example:"10737418240"`
  15. Reset int `json:"reset" form:"reset" gorm:"default:0" example:"0"`
  16. LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0" example:"1735680000000"`
  17. }