app-cloudep-order-server/internal/model/mongo/order_model.go

26 lines
582 B
Go
Raw Normal View History

2024-10-06 07:02:30 +00:00
package model
import "github.com/zeromicro/go-zero/core/stores/mon"
var _ OrderModel = (*customOrderModel)(nil)
type (
// OrderModel is an interface to be customized, add more methods here,
// and implement the added methods in customOrderModel.
OrderModel interface {
orderModel
}
customOrderModel struct {
*defaultOrderModel
}
)
// NewOrderModel returns a model for the mongo.
func NewOrderModel(url, db, collection string) OrderModel {
conn := mon.MustNewModel(url, db, collection)
return &customOrderModel{
defaultOrderModel: newDefaultOrderModel(conn),
}
}