Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
全局数据库对象
Functions ¶
func ConnSqlite ¶
Types ¶
type Chat ¶
type Chat struct { gorm.Model Username string `gorm:"type:varchar(50);not null;comment:'用户名'" json:"username"` // 用户名 Source string `gorm:"type:varchar(50);comment:'用户来源:群聊名字,私聊'" json:"source"` // 对话来源 ChatType ChatType `gorm:"type:tinyint(1);default:1;comment:'类型:1问, 2答'" json:"chat_type"` // 状态 ParentContent uint `gorm:"default:0;comment:'父消息编号(编号为0时表示为首条)'" json:"parent_content"` Content string `gorm:"type:varchar(128);comment:'内容'" json:"content"` // 问题或回答的内容 }
type ChatListReq ¶
Click to show internal directories.
Click to hide internal directories.