🎨 优化项目结构 && 完善ai配置
This commit is contained in:
@@ -4,13 +4,14 @@ import (
|
||||
"git.echol.cn/loser/ai_proxy/server/global"
|
||||
)
|
||||
|
||||
// AiPresetBinding 预设-提供商绑定关系
|
||||
// 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"`
|
||||
Name string `json:"name" gorm:"type:varchar(100);not null;uniqueIndex:idx_user_binding;comment:绑定名称"`
|
||||
PresetID uint `json:"preset_id" gorm:"not null;index;comment:预设ID"`
|
||||
ProviderID uint `json:"provider_id" gorm:"not null;index;comment:提供商ID"`
|
||||
Enabled bool `json:"enabled" gorm:"default:true;comment:是否启用"`
|
||||
UserID uint `json:"user_id" gorm:"index:idx_user_binding;comment:用户ID"`
|
||||
|
||||
// 关联
|
||||
Preset AiPreset `json:"preset" gorm:"foreignKey:PresetID"`
|
||||
|
||||
Reference in New Issue
Block a user