conversationmodel.go 682 B

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