feat: 重构 RBAC1 角色权限模型
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TakeoutSaaS.Domain.Identity.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Identity.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 角色仓储。
|
||||
/// </summary>
|
||||
public interface IRoleRepository
|
||||
{
|
||||
Task<Role?> FindByIdAsync(long roleId, long tenantId, CancellationToken cancellationToken = default);
|
||||
Task<Role?> FindByCodeAsync(string code, long tenantId, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<Role>> GetByIdsAsync(long tenantId, IEnumerable<long> roleIds, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<Role>> SearchAsync(long tenantId, string? keyword, CancellationToken cancellationToken = default);
|
||||
Task AddAsync(Role role, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(Role role, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(long roleId, long tenantId, CancellationToken cancellationToken = default);
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user