[ADD] Added repository implementations
This commit is contained in:
@@ -2,5 +2,9 @@ namespace DotBased.AspNet.Authority.Models.Authority;
|
||||
|
||||
public class AuthorityAttributeItem
|
||||
{
|
||||
public Guid BoundId { get; set; }
|
||||
|
||||
public string AttributeKey { get; set; } = string.Empty;
|
||||
|
||||
public string AttributeValue { get; set; } = string.Empty;
|
||||
}
|
@@ -2,5 +2,7 @@ namespace DotBased.AspNet.Authority.Models.Authority;
|
||||
|
||||
public class AuthorityGroupItem
|
||||
{
|
||||
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
public string? Name { get; set; }
|
||||
}
|
@@ -5,7 +5,7 @@ namespace DotBased.AspNet.Authority.Repositories;
|
||||
public interface IAttributeRepository
|
||||
{
|
||||
public Task<ListResult<AuthorityAttributeItem>> GetAttributesAsync(int limit = 20, int offset = 0, string search = "", CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> GetAttributeByIdAsync(string id, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> GetAttributeByKeyAsync(string id, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> CreateAttributeAsync(AuthorityAttribute attribute, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> UpdateAttributeAsync(AuthorityAttribute attribute, CancellationToken cancellationToken = default);
|
||||
public Task<Result> DeleteAttributeAsync(AuthorityAttribute attribute, CancellationToken cancellationToken = default);
|
||||
|
@@ -5,8 +5,8 @@ namespace DotBased.AspNet.Authority.Repositories;
|
||||
public interface IGroupRepository
|
||||
{
|
||||
public Task<ListResult<AuthorityGroupItem>> GetGroupsAsync(int limit = 20, int offset = 0, string search = "", CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> GetGroupByIdAsync(string id, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> CreateGroupAsync(AuthorityGroup group, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityAttribute>> UpdateGroupAsync(AuthorityGroup group, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityGroup>> GetGroupByIdAsync(string id, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityGroup>> CreateGroupAsync(AuthorityGroup group, CancellationToken cancellationToken = default);
|
||||
public Task<Result<AuthorityGroup>> UpdateGroupAsync(AuthorityGroup group, CancellationToken cancellationToken = default);
|
||||
public Task<Result> DeleteGroupAsync(AuthorityGroup group, CancellationToken cancellationToken = default);
|
||||
}
|
Reference in New Issue
Block a user