Sfoglia il codice sorgente

feat: add BoundChannelId field to Token model

Add BoundChannelId field to support binding a token to a specific channel.
When set, the token will always use the bound channel for requests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat/alipay-payment
fengsilin 6 mesi fa
parent
commit
516515bab6
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      model/token.go

+ 2
- 1
model/token.go Vedi File

@@ -27,7 +27,8 @@ type Token struct {
AllowIps *string `json:"allow_ips" gorm:"default:''"`
UsedQuota int `json:"used_quota" gorm:"default:0"` // used quota
Group string `json:"group" gorm:"default:''"`
CrossGroupRetry bool `json:"cross_group_retry"` // 跨分组重试,仅auto分组有效
CrossGroupRetry bool `json:"cross_group_retry"` // 跨分组重试,仅auto分组有效
BoundChannelId *int `json:"bound_channel_id" gorm:"index"` // 绑定的渠道ID,nil表示不绑定
DeletedAt gorm.DeletedAt `gorm:"index"`
}



Caricamento…
Annulla
Salva