🎨 优化项目结构 && 完善ai配置

This commit is contained in:
2026-03-03 15:39:23 +08:00
parent 557c865948
commit 2714e63d2a
585 changed files with 62223 additions and 100018 deletions

View File

@@ -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"`