2021-06-07 17:22:07 +08:00
|
|
|
|
package repository
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2022-06-02 17:41:11 +08:00
|
|
|
|
"mayfly-go/internal/sys/domain/entity"
|
2023-10-26 17:15:49 +08:00
|
|
|
|
"mayfly-go/pkg/base"
|
2022-06-02 17:41:11 +08:00
|
|
|
|
"mayfly-go/pkg/model"
|
2021-06-07 17:22:07 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type Role interface {
|
2023-10-26 17:15:49 +08:00
|
|
|
|
base.Repo[*entity.Role]
|
2021-06-07 17:22:07 +08:00
|
|
|
|
|
2023-12-18 22:39:32 +08:00
|
|
|
|
GetPageList(condition *entity.RoleQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
|
|
|
|
|
|
|
|
|
|
|
|
ListByQuery(condition *entity.RoleQuery) ([]*entity.Role, error)
|
|
|
|
|
|
}
|
2021-06-07 17:22:07 +08:00
|
|
|
|
|
2023-12-18 22:39:32 +08:00
|
|
|
|
type AccountRole interface {
|
|
|
|
|
|
base.Repo[*entity.AccountRole]
|
2021-06-07 17:22:07 +08:00
|
|
|
|
|
2023-12-18 22:39:32 +08:00
|
|
|
|
GetPageList(condition *entity.RoleAccountQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
|
2021-06-07 17:22:07 +08:00
|
|
|
|
}
|
2024-04-28 23:45:57 +08:00
|
|
|
|
|
|
|
|
|
|
type RoleResource interface {
|
|
|
|
|
|
base.Repo[*entity.RoleResource]
|
|
|
|
|
|
|
|
|
|
|
|
// 获取角色拥有的资源id数组,从role_resource表获取
|
|
|
|
|
|
GetRoleResourceIds(roleId uint64) []uint64
|
|
|
|
|
|
|
|
|
|
|
|
GetRoleResources(roleId uint64, toEntity any)
|
|
|
|
|
|
}
|