From b412df70f1b2e9f10b75e095a2329f10b48e01b5 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 18 Feb 2023 16:07:32 +0330 Subject: update pack 2 --- database/model/model.go | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'database') diff --git a/database/model/model.go b/database/model/model.go index 56118c73..25e0cd41 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -24,15 +24,15 @@ type User struct { } type Inbound struct { - Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"` - UserId int `json:"-"` - Up int64 `json:"up" form:"up"` - Down int64 `json:"down" form:"down"` - Total int64 `json:"total" form:"total"` - Remark string `json:"remark" form:"remark"` - Enable bool `json:"enable" form:"enable"` - ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` - ClientStats []xray.ClientTraffic `gorm:"foreignKey:InboundId;references:Id" json:"clientStats" form:"clientStats"` + Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"` + UserId int `json:"-"` + Up int64 `json:"up" form:"up"` + Down int64 `json:"down" form:"down"` + Total int64 `json:"total" form:"total"` + Remark string `json:"remark" form:"remark"` + Enable bool `json:"enable" form:"enable"` + ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` + ClientStats []xray.ClientTraffic `gorm:"foreignKey:InboundId;references:Id" json:"clientStats" form:"clientStats"` // config part Listen string `json:"listen" form:"listen"` @@ -65,11 +65,12 @@ type Setting struct { Key string `json:"key" form:"key"` Value string `json:"value" form:"value"` } + type Client struct { - ID string `json:"id"` - AlterIds uint16 `json:"alterId"` - Email string `json:"email"` - Security string `json:"security"` - TotalGB int64 `json:"totalGB" form:"totalGB"` + ID string `json:"id"` + AlterIds uint16 `json:"alterId"` + Email string `json:"email"` + Security string `json:"security"` + TotalGB int64 `json:"totalGB" form:"totalGB"` ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` -} \ No newline at end of file +} -- cgit v1.2.3