chatlogmodel.go 612 B

12345678910111213141516171819202122232425
  1. package immodel
  2. import "github.com/zeromicro/go-zero/core/stores/mon"
  3. var _ ChatLogModel = (*customChatLogModel)(nil)
  4. type (
  5. // ChatLogModel is an interface to be customized, add more methods here,
  6. // and implement the added methods in customChatLogModel.
  7. ChatLogModel interface {
  8. chatLogModel
  9. }
  10. customChatLogModel struct {
  11. *defaultChatLogModel
  12. }
  13. )
  14. // NewChatLogModel returns a model for the mongo.
  15. func NewChatLogModel(url, db, collection string) ChatLogModel {
  16. conn := mon.MustNewModel(url, db, collection)
  17. return &customChatLogModel{
  18. defaultChatLogModel: newDefaultChatLogModel(conn),
  19. }
  20. }