diff options
| author | Mohammad Movaghari <52345697+mohammadmovaghari@users.noreply.github.com> | 2023-04-12 16:29:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-12 16:29:17 +0300 |
| commit | c575425292e2c4c690728174e42a6f34963394c2 (patch) | |
| tree | c9b033457baa55a98cea23a8769645f8f3dbd476 /database | |
| parent | 63f71e527ceddc724e0bd2893c4946b01f3a5f6c (diff) | |
| parent | 82b2809fccb6a131b4f84e2ca236f8bea567beae (diff) | |
Merge branch 'MHSanaei:main' into main
Diffstat (limited to 'database')
| -rw-r--r-- | database/db.go | 2 | ||||
| -rw-r--r-- | database/model/model.go | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/database/db.go b/database/db.go index f7a590b2..b9c16be8 100644 --- a/database/db.go +++ b/database/db.go @@ -92,7 +92,7 @@ func InitDB(dbPath string) error { if err != nil { return err } - + return nil } diff --git a/database/model/model.go b/database/model/model.go index 606b922c..778ad9b6 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -44,9 +44,9 @@ type Inbound struct { Sniffing string `json:"sniffing" form:"sniffing"` } type InboundClientIps struct { - Id int `json:"id" gorm:"primaryKey;autoIncrement"` + Id int `json:"id" gorm:"primaryKey;autoIncrement"` ClientEmail string `json:"clientEmail" form:"clientEmail" gorm:"unique"` - Ips string `json:"ips" form:"ips"` + Ips string `json:"ips" form:"ips"` } func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig { @@ -80,4 +80,7 @@ type Client struct { LimitIP int `json:"limitIp"` TotalGB int64 `json:"totalGB" form:"totalGB"` ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` + Enable bool `json:"enable" form:"enable"` + TgID string `json:"tgId" form:"tgId"` + SubID string `json:"subId" form:"subId"` } |
