23 lines
703 B
Go
23 lines
703 B
Go
package app
|
|
|
|
import (
|
|
"git.echol.cn/loser/ai_proxy/server/global"
|
|
)
|
|
|
|
// AiPresetBinding 预设-提供商绑定关系
|
|
type AiPresetBinding struct {
|
|
global.GVA_MODEL
|
|
PresetID uint `json:"presetId" gorm:"comment:预设ID;index"`
|
|
ProviderID uint `json:"providerId" gorm:"comment:提供商ID;index"`
|
|
Priority int `json:"priority" gorm:"comment:优先级;default:0"` // 多个预设时的执行顺序
|
|
IsActive bool `json:"isActive" gorm:"comment:是否启用;default:true"`
|
|
|
|
// 关联
|
|
Preset AiPreset `json:"preset" gorm:"foreignKey:PresetID"`
|
|
Provider AiProvider `json:"provider" gorm:"foreignKey:ProviderID"`
|
|
}
|
|
|
|
func (AiPresetBinding) TableName() string {
|
|
return "ai_preset_bindings"
|
|
}
|