mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
db
This commit is contained in:
parent
e02ca2f7e3
commit
6eb44cb9d8
@ -181,7 +181,7 @@ type ChatLog struct {
|
||||
SessionType int32 `gorm:"column:session_type" json:"sessionType"`
|
||||
MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"`
|
||||
ContentType int32 `gorm:"column:content_type" json:"contentType"`
|
||||
Content string `gorm:"column:content;type:varchar(1000)" json:"content"`
|
||||
Content []byte `gorm:"column:content;type:varchar(1000)" json:"content"`
|
||||
Status int32 `gorm:"column:status" json:"status"`
|
||||
Seq uint32 `gorm:"column:seq;index:index_seq;default:0" json:"seq"`
|
||||
SendTime time.Time `gorm:"column:send_time" json:"sendTime"`
|
||||
|
@ -27,7 +27,7 @@ func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error {
|
||||
case constant.SingleChatType:
|
||||
chatLog.RecvID = msg.MsgData.RecvID
|
||||
}
|
||||
chatLog.Content = string(msg.MsgData.Content)
|
||||
chatLog.Content = msg.MsgData.Content
|
||||
chatLog.CreateTime = utils.UnixMillSecondToTime(msg.MsgData.CreateTime)
|
||||
chatLog.SendTime = utils.UnixMillSecondToTime(msg.MsgData.SendTime)
|
||||
return dbConn.Table("chat_logs").Create(chatLog).Error
|
||||
|
Loading…
x
Reference in New Issue
Block a user