Files
st/server/model/app/ai_preset.go

23 lines
878 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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"
}