package model

import "github.com/zeromicro/go-zero/core/stores/mon"

var _ AppsModel = (*customAppsModel)(nil)

type (
	// AppsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customAppsModel.
	AppsModel interface {
		appsModel
	}

	customAppsModel struct {
		*defaultAppsModel
	}
)

// NewAppsModel returns a model for the mongo.
func NewAppsModel(url, db, collection string) AppsModel {
	conn := mon.MustNewModel(url, db, collection)
	return &customAppsModel{
		defaultAppsModel: newDefaultAppsModel(conn),
	}
}
