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

28 lines
623 B
Go
Raw Normal View History

2024-08-24 07:14:12 +00:00
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...),
}
}