🎨 重构用户端前端为vue开发,完善基础类和角色相关接口

This commit is contained in:
2026-02-10 21:55:45 +08:00
parent db934ebed7
commit 56e821b222
92 changed files with 18377 additions and 21 deletions

View File

@@ -0,0 +1,22 @@
package app
import (
"git.echol.cn/loser/st/server/global"
"gorm.io/datatypes"
)
// AIPreset 对话预设表
type AIPreset struct {
global.GVA_MODEL
Name string `json:"name" gorm:"type:varchar(200);not null;comment:预设名称"`
UserID *uint `json:"userId" gorm:"index;comment:所属用户IDNULL表示系统预设"`
User *AppUser `json:"user" gorm:"foreignKey:UserID"`
PresetType string `json:"presetType" gorm:"type:varchar(100);not null;index;comment:预设类型"`
Config datatypes.JSON `json:"config" gorm:"type:jsonb;not null;comment:预设配置"`
IsSystem bool `json:"isSystem" gorm:"default:false;comment:是否为系统预设"`
IsDefault bool `json:"isDefault" gorm:"default:false;comment:是否为默认预设"`
}
func (AIPreset) TableName() string {
return "ai_presets"
}