新功能(#69): 支持用户级限速覆盖

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-05-26 11:26:27 -07:00
parent 22d9773f1b
commit f30b7cded7
9 changed files with 95 additions and 42 deletions
+2
View File
@@ -103,6 +103,8 @@ type Subscribe struct {
Upload int64 `gorm:"default:0;comment:Upload Traffic"`
ExpiredDownload int64 `gorm:"default:0;comment:Expired period download traffic (bytes)"`
ExpiredUpload int64 `gorm:"default:0;comment:Expired period upload traffic (bytes)"`
SpeedLimit int64 `gorm:"default:0;comment:User-level speed limit override (Mbps), 0 uses plan-level"`
TrafficLimit *string `gorm:"type:text;default:null;comment:User-level traffic limit override (JSON), NULL uses plan-level"`
Token string `gorm:"index:idx_token;unique;type:varchar(255);default:'';comment:Token"`
UUID string `gorm:"type:varchar(255);unique;index:idx_uuid;default:'';comment:UUID"`
Status uint8 `gorm:"type:tinyint(1);default:0;comment:Subscription Status: 0: Pending 1: Active 2: Finished 3: Expired 4: Deducted 5: stopped"`