mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-17 02:12:27 +08:00
1.MongoDB、Redis兼容集群模式
2.离线数据接口化访问
This commit is contained in:
22
gs/model/chat_msg.go
Normal file
22
gs/model/chat_msg.go
Normal file
@@ -0,0 +1,22 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user