appsmodel.go 568 B

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