🎨 重构用户端前端为vue开发,完善基础类和角色相关接口
This commit is contained in:
26
server/model/app/ai_world_info.go
Normal file
26
server/model/app/ai_world_info.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/st/server/global"
|
||||
"github.com/lib/pq"
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
// AIWorldInfo 世界书(World Info)表
|
||||
type AIWorldInfo struct {
|
||||
global.GVA_MODEL
|
||||
UserID uint `json:"userId" gorm:"not null;index;comment:所属用户ID"`
|
||||
User *AppUser `json:"user" gorm:"foreignKey:UserID"`
|
||||
CharacterID *uint `json:"characterId" gorm:"index;comment:关联角色ID"`
|
||||
Character *AICharacter `json:"character" gorm:"foreignKey:CharacterID"`
|
||||
Name string `json:"name" gorm:"type:varchar(500);not null;comment:世界书名称"`
|
||||
Keywords pq.StringArray `json:"keywords" gorm:"type:text[];comment:触发关键词"`
|
||||
Content string `json:"content" gorm:"type:text;not null;comment:内容"`
|
||||
Priority int `json:"priority" gorm:"default:0;comment:优先级"`
|
||||
IsEnabled bool `json:"isEnabled" gorm:"default:true;comment:是否启用"`
|
||||
TriggerConfig datatypes.JSON `json:"triggerConfig" gorm:"type:jsonb;comment:触发条件配置"`
|
||||
}
|
||||
|
||||
func (AIWorldInfo) TableName() string {
|
||||
return "ai_world_info"
|
||||
}
|
||||
Reference in New Issue
Block a user