Files
hk4e/gs/model/chat_msg.go
flswld 0395dc0bc2 1.MongoDB、Redis兼容集群模式
2.离线数据接口化访问
2023-02-26 23:03:13 +08:00

23 lines
547 B
Go

package model
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
const (
ChatMsgTypeText = iota
ChatMsgTypeIcon
)
type ChatMsg struct {
ID primitive.ObjectID `bson:"_id,omitempty"`
Sequence uint32 `bson:"-"`
Time uint32 `bson:"Time"`
Uid uint32 `bson:"Uid"`
ToUid uint32 `bson:"ToUid"`
IsRead bool `bson:"IsRead"`
MsgType uint8 `bson:"MsgType"`
Text string `bson:"Text"`
Icon uint32 `bson:"Icon"`
}