conversationlistmodel.go 738 B

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