You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/db/controller/chatlog.go

28 lines
943 B

2 years ago
package controller
import (
2 years ago
relationTb "OpenIM/pkg/common/db/table/relation"
pbMsg "OpenIM/pkg/proto/msg"
2 years ago
)
2 years ago
type ChatLogDatabase interface {
2 years ago
CreateChatLog(msg pbMsg.MsgDataToMQ) error
2 years ago
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error)
2 years ago
}
2 years ago
func NewChatLogDatabase(chatLogModelInterface relationTb.ChatLogModelInterface) ChatLogDatabase {
return &ChatLogDataBase{chatLogModel: chatLogModelInterface}
2 years ago
}
type ChatLogDataBase struct {
2 years ago
chatLogModel relationTb.ChatLogModelInterface
2 years ago
}
func (c *ChatLogDataBase) CreateChatLog(msg pbMsg.MsgDataToMQ) error {
2 years ago
return c.chatLogModel.Create(msg)
2 years ago
}
2 years ago
func (c *ChatLogDataBase) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error) {
2 years ago
return c.chatLogModel.GetChatLog(chatLog, pageNumber, showNumber, contentTypeList)
2 years ago
}