2023-02-09 11:18:06 -08:00
|
|
|
package xray
|
|
|
|
|
|
2025-09-20 00:35:50 -07:00
|
|
|
// ClientTraffic represents traffic statistics and limits for a specific client.
|
|
|
|
|
// It tracks upload/download usage, expiry times, and online status for inbound clients.
|
2023-02-09 11:18:06 -08:00
|
|
|
type ClientTraffic struct {
|
2023-02-18 04:37:32 -08:00
|
|
|
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
|
2025-02-04 02:27:58 -08:00
|
|
|
InboundId int `json:"inboundId" form:"inboundId"`
|
2023-02-09 11:18:06 -08:00
|
|
|
Enable bool `json:"enable" form:"enable"`
|
2025-02-04 02:27:58 -08:00
|
|
|
Email string `json:"email" form:"email" gorm:"unique"`
|
2025-09-21 10:16:54 -07:00
|
|
|
UUID string `json:"uuid" form:"uuid" gorm:"-"`
|
2025-09-16 16:29:22 -07:00
|
|
|
SubId string `json:"subId" form:"subId" gorm:"-"`
|
2023-02-18 04:37:32 -08:00
|
|
|
Up int64 `json:"up" form:"up"`
|
|
|
|
|
Down int64 `json:"down" form:"down"`
|
2023-02-09 11:18:06 -08:00
|
|
|
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
|
|
|
|
Total int64 `json:"total" form:"total"`
|
2023-12-04 10:20:16 -08:00
|
|
|
Reset int `json:"reset" form:"reset" gorm:"default:0"`
|
2025-08-31 09:33:50 -07:00
|
|
|
LastOnline int64 `json:"lastOnline" form:"lastOnline" gorm:"default:0"`
|
2023-02-09 11:18:06 -08:00
|
|
|
}
|