feat: add concurrency limit fields
Add user and channel model fields for concurrency and RPM controls.
This commit is contained in:
parent
886d32f255
commit
befce8a55c
@ -39,6 +39,7 @@ type Channel struct {
|
||||
Group string `json:"group" gorm:"type:varchar(64);default:'default'"`
|
||||
UsedQuota int64 `json:"used_quota" gorm:"bigint;default:0"`
|
||||
QuotaLimit int64 `json:"quota_limit" gorm:"bigint;default:0"`
|
||||
ConcurrencyLimit int `json:"concurrency_limit" gorm:"default:0"`
|
||||
QuotaResetPeriod string `json:"quota_reset_period" gorm:"type:varchar(16);default:'never'"`
|
||||
QuotaResetCustomSeconds int `json:"quota_reset_custom_seconds" gorm:"type:int;default:0"`
|
||||
LastResetTime int64 `json:"last_reset_time" gorm:"bigint;default:0"`
|
||||
|
||||
@ -40,6 +40,8 @@ type User struct {
|
||||
Quota int `json:"quota" gorm:"type:int;default:0"`
|
||||
UsedQuota int `json:"used_quota" gorm:"type:int;default:0;column:used_quota"` // used quota
|
||||
RequestCount int `json:"request_count" gorm:"type:int;default:0;"` // request number
|
||||
ConcurrencyLimit int `json:"concurrency_limit" gorm:"default:0"`
|
||||
RpmLimit int `json:"rpm_limit" gorm:"default:0"`
|
||||
Group string `json:"group" gorm:"type:varchar(64);default:'default'"`
|
||||
AffCode string `json:"aff_code" gorm:"type:varchar(32);column:aff_code;uniqueIndex"`
|
||||
AffCount int `json:"aff_count" gorm:"type:int;default:0;column:aff_count"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user