app-cloudep-permission-server/internal/model/role_model.go

28 lines
623 B
Go
Executable File

package model
import (
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
var _ RoleModel = (*customRoleModel)(nil)
type (
// RoleModel is an interface to be customized, add more methods here,
// and implement the added methods in customRoleModel.
RoleModel interface {
roleModel
}
customRoleModel struct {
*defaultRoleModel
}
)
// NewRoleModel returns a model for the database table.
func NewRoleModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) RoleModel {
return &customRoleModel{
defaultRoleModel: newRoleModel(conn, c, opts...),
}
}