mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-17 05:33:42 +08:00
⚡️ feat: channel support plugin settings (#89)
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"one-api/common"
|
||||
"strings"
|
||||
|
||||
"gorm.io/datatypes"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -28,8 +29,12 @@ type Channel struct {
|
||||
Priority *int64 `json:"priority" gorm:"bigint;default:0"`
|
||||
Proxy *string `json:"proxy" gorm:"type:varchar(255);default:''"`
|
||||
TestModel string `json:"test_model" form:"test_model" gorm:"type:varchar(50);default:''"`
|
||||
|
||||
Plugin *datatypes.JSONType[PluginType] `json:"plugin" form:"plugin" gorm:"type:json"`
|
||||
}
|
||||
|
||||
type PluginType map[string]map[string]interface{}
|
||||
|
||||
var allowedChannelOrderFields = map[string]bool{
|
||||
"id": true,
|
||||
"name": true,
|
||||
|
||||
Reference in New Issue
Block a user