2025-04-22 20:59:25 +08:00

29 lines
989 B
Go

package model
import (
"gitee.ltd/lxh/wechat-robot/internal/types"
"time"
)
// Message 表示微信消息
type Message struct {
BaseModel
RobotId uint `gorm:"index:deleted,unique"` // 机器人Id
MsgId int64 `gorm:"index:deleted,unique"` // 消息Id
ClientMsgId int `gorm:"index:deleted,unique"` // 客户端消息Id
CreateTime int // 发送时间戳
CreateAt time.Time // 发送时间
Type types.MessageType // 消息类型
Content string // 内容
DisplayFullContent string // 显示的完整内容
FromUser string // 发送者
GroupUser string // 群成员
ToUser string // 接收者
FileUrl string `gorm:"column:file_url"` // 文件地址
}
// TableName 指定表名
func (Message) TableName() string {
return "messages"
}