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:所属用户ID(NULL表示系统预设)"` 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" }