Files
mayfly-go/server/internal/sys/domain/repository/role.go
meilin.huang 17d96acceb refactor: interface{} -> any
feat: 新增外链菜单
2023-06-01 12:31:32 +08:00

32 lines
802 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package repository
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/pkg/model"
)
type Role interface {
GetPageList(condition *entity.Role, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult
Delete(id uint64)
// 获取角色拥有的资源id数组从role_resource表获取
GetRoleResourceIds(roleId uint64) []uint64
GetRoleResources(roleId uint64, toEntity any)
SaveRoleResource(rr *entity.RoleResource)
DeleteRoleResource(roleId uint64, resourceId uint64)
// 获取账号拥有的角色id数组从account_role表获取
GetAccountRoleIds(accountId uint64) []uint64
SaveAccountRole(ar *entity.AccountRole)
DeleteAccountRole(accountId, roleId uint64)
// 获取账号角色信息列表
GetAccountRoles(accountId uint64, toEntity any)
}