Files
mayfly-go/server/internal/sys/domain/repository/role.go
2025-05-20 21:04:47 +08:00

31 lines
746 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/base"
"mayfly-go/pkg/model"
)
type Role interface {
base.Repo[*entity.Role]
GetPageList(condition *entity.RoleQuery, orderBy ...string) (*model.PageResult[*entity.Role], error)
ListByQuery(condition *entity.RoleQuery) ([]*entity.Role, error)
}
type AccountRole interface {
base.Repo[*entity.AccountRole]
GetPageList(condition *entity.RoleAccountQuery, orderBy ...string) (*model.PageResult[*entity.AccountRolePO], error)
}
type RoleResource interface {
base.Repo[*entity.RoleResource]
// 获取角色拥有的资源id数组从role_resource表获取
GetRoleResourceIds(roleId uint64) []uint64
GetRoleResources(roleId uint64, toEntity any)
}