tables

package
v0.26.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chatroom

type Chatroom struct {
	Rd           uint   `json:"rd" gorm:"primaryKey"`      // 主键
	Roomid       string `json:"roomid" gorm:"uniqueIndex"` // 群聊 id
	Name         string `json:"name"`                      // 群聊名称
	Level        int32  `json:"level" gorm:"default:-1"`   // 等级 [1:待验证, 2:已注册]
	Remark       string `json:"remark"`                    // 备注
	JoinArgot    string `json:"join_argot"`                // 加群指令
	PatReturn    string `json:"pat_return"`                // 响应拍拍我
	RevokeMsg    string `json:"revoke_msg"`                // 防撤回消息
	WelcomeMsg   string `json:"welcome_msg"`               // 欢迎消息
	ModelContext string `json:"model_context"`             // 定义模型扮演的身份
	ModelDefault string `json:"model_default"`             // 定义默认模型
	ModelHistory int    `json:"model_history"`             // 定义历史消息数量
	CreatedAt    int64  `json:"created_at"`                // 创建时间戳
	UpdatedAt    int64  `json:"updated_at"`                // 最后更新时间戳
}

type Contact

type Contact struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`    // 主键
	Wxid      string `json:"wxid" gorm:"uniqueIndex"` // 微信 id
	Code      string `json:"code"`                    // 微信号
	Remark    string `json:"remark"`                  // 备注
	Name      string `json:"name"`                    // 微信昵称
	Country   string `json:"country"`                 // 国家
	Province  string `json:"province"`                // 省/州
	City      string `json:"city"`                    // 城市
	Gender    int32  `json:"gender"`                  // 性别
	CreatedAt int64  `json:"created_at"`              // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`              // 最后更新时间戳
}

type Cronjob

type Cronjob struct {
	Rd         uint   `json:"rd" gorm:"primaryKey"` // 主键
	Name       string `json:"name"`                 // 名称
	Second     string `json:"second"`               // 秒
	Minute     string `json:"minute"`               // 分
	Hour       string `json:"hour"`                 // 时
	DayOfMonth string `json:"day_of_month"`         // 日
	Month      string `json:"month"`                // 月
	DayOfWeek  string `json:"day_of_week"`          // 周
	Type       string `json:"type"`                 // 命令类型 [CMD, POWERSHELL, SHELL]
	Timeout    uint   `json:"timeout"`              // 超时时间(秒)
	Directory  string `json:"directory"`            // 工作目录
	Content    string `json:"content"`              // 命令内容
	Deliver    string `json:"deliver"`              // 执行结果交付方式
	EntryId    int64  `json:"entry_id"`             // 任务运行时 Id
	CreatedAt  int64  `json:"created_at"`           // 创建时间戳
	UpdatedAt  int64  `json:"updated_at"`           // 最后更新时间戳
}

type Keyword

type Keyword struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`                                  // 主键
	Group     string `json:"group" gorm:"uniqueIndex:idx_keyword_g_r_p"`            // 分组
	Roomid    string `json:"roomid" gorm:"uniqueIndex:idx_keyword_g_r_p;default:-"` // 群聊 id
	Phrase    string `json:"phrase" gorm:"uniqueIndex:idx_keyword_g_r_p"`           // 短语
	Level     int32  `json:"level" gorm:"default:-1"`                               // 等级
	Target    string `json:"target"`                                                // 目标
	Remark    string `json:"remark"`                                                // 备注
	CreatedAt int64  `json:"created_at"`                                            // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`                                            // 最后更新时间戳
}

type LLModel

type LLModel struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`    // 主键
	Mid       string `json:"mid" gorm:"uniqueIndex"`  // 模型 Id,用于生成模型切换指令
	Level     int32  `json:"level" gorm:"default:-1"` // 等级,用于限制用户访问
	Family    string `json:"family"`                  // 模型家族,用于在指令中描述模型类型
	Provider  string `json:"provider"`                // 服务商 [google, openai, xunfei, baidu, tencent]
	Model     string `json:"model"`                   // 模型,必须和服务商对应
	Secret    string `json:"secret"`                  // 密钥,必须和服务商对应,多个字段按指定顺序填写并用逗号隔开
	Endpoint  string `json:"endpoint"`                // 仅 google 和 openai 支持自定义
	CreatedAt int64  `json:"created_at"`              // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`              // 最后更新时间戳
}

type Message

type Message struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`    // 主键
	Id        uint64 `json:"id" gorm:"uniqueIndex"`   // 消息 id
	IsSelf    bool   `json:"is_self"`                 // 是否自己发送的
	IsGroup   bool   `json:"is_group"`                // 是否群消息
	Type      uint32 `json:"type"`                    // 消息类型
	Ts        uint32 `json:"ts"`                      // 消息类型
	Roomid    string `json:"roomid" gorm:"default:-"` // 群 id(如果是群消息的话)
	Content   string `json:"content"`                 // 消息内容
	Sender    string `json:"sender"`                  // 消息发送者
	Sign      string `json:"sign"`                    // Sign
	Thumb     string `json:"thumb"`                   // 缩略图
	Extra     string `json:"extra"`                   // 附加内容
	Xml       string `json:"xml"`                     // 消息 xml
	Remark    string `json:"remark"`                  // 备注,非微信字段
	CreatedAt int64  `json:"created_at"`              // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`              // 最后更新时间戳
}

type Profile

type Profile struct {
	Rd        uint   `json:"rd" gorm:"primaryKey" `                               // 主键
	Wxid      string `json:"wxid" gorm:"uniqueIndex:idx_profile_w_r"`             // 微信 id
	Roomid    string `json:"roomid" gorm:"uniqueIndex:idx_profile_w_r;default:-"` // 群聊 id
	Level     int32  `json:"level" gorm:"default:-1"`                             // 等级 [1:待验证, 2:已注册, 7:管理员, 9:创始人]
	Remark    string `json:"remark"`                                              // 备注
	AiModel   string `json:"ai_model"`                                            // 会话模型
	BanExpire int64  `json:"ban_expire"`                                          // 拉黑截止时间
	CreatedAt int64  `json:"created_at"`                                          // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`                                          // 最后更新时间戳
}

type Setting

type Setting struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`       // 主键
	Name      string `json:"name" gorm:"uniqueIndex"`    // 键
	Type      string `json:"type" gorm:"default:string"` // 类型
	Group     string `json:"group" gorm:"index"`         // 分组
	Value     string `json:"value"`                      // 值
	Title     string `json:"title"`                      // 标题
	Remark    string `json:"remark"`                     // 备注
	CreatedAt int64  `json:"created_at"`                 // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`                 // 最后更新时间戳
}

type Webhook added in v0.23.0

type Webhook struct {
	Rd        uint   `json:"rd" gorm:"primaryKey"`         // 主键
	TargetId  string `json:"target_id" gorm:"uniqueIndex"` // 群聊/私聊ID
	Token     string `json:"token" gorm:"uniqueIndex"`     // webhook 标识(GUID)
	Remark    string `json:"remark"`                       // 备注
	CreatedAt int64  `json:"created_at"`                   // 创建时间戳
	UpdatedAt int64  `json:"updated_at"`                   // 最后更新时间戳
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL