Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xray
diff options
context:
space:
mode:
authorZahar Izmailov <izmailov9@gmail.com>2025-02-03 15:36:03 +0300
committerGitHub <noreply@github.com>2025-02-03 15:36:03 +0300
commitb922d986d6783ce28d00ca948024dee44a11f29e (patch)
tree646c000eca419a8f0ad4e742762bfcf74f8f9a07 /xray
parent8a7cffd63f4ced8caaa20e90aa60228d24bda510 (diff)
Improved database model migration and added indexing (#2655)
Diffstat (limited to 'xray')
-rw-r--r--xray/client_traffic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xray/client_traffic.go b/xray/client_traffic.go
index 0f2389a0..6eb2d270 100644
--- a/xray/client_traffic.go
+++ b/xray/client_traffic.go
@@ -2,9 +2,9 @@ package xray
type ClientTraffic struct {
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
- InboundId int `json:"inboundId" form:"inboundId"`
+ InboundId int `json:"inboundId" form:"inboundId" gorm:"index;not null"`
Enable bool `json:"enable" form:"enable"`
- Email string `json:"email" form:"email" gorm:"unique"`
+ Email string `json:"email" form:"email" gorm:"uniqueIndex"`
Up int64 `json:"up" form:"up"`
Down int64 `json:"down" form:"down"`
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`