mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-01-18 10:04:20 +01:00
[CHANGE] Updated models
This commit is contained in:
parent
fd733b7238
commit
3ccd3106c1
|
@ -19,8 +19,16 @@ public partial class AuthorityManager
|
|||
return Result<AuthorityRole>.Failed("Not implemented!");
|
||||
}
|
||||
|
||||
public async Task AddUserToRole(AuthorityUser user, AuthorityRole role, CancellationToken? cancellationToken = null)
|
||||
public async Task AddRoleToUserAsync(AuthorityUser user, AuthorityRole role, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task RemoveRoleFromUserAsync(AuthorityRole role, AuthorityUser user, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task AddRoleToGroupAsync(AuthorityRole role, AuthorityGroup group, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace DotBased.AspNet.Authority.Models.Authority;
|
||||
|
||||
public class AuthorityGroup : AuthorityGroup<Guid>
|
||||
public class AuthorityGroup
|
||||
{
|
||||
public AuthorityGroup(string name) : this()
|
||||
{
|
||||
|
@ -12,11 +12,8 @@ public class AuthorityGroup : AuthorityGroup<Guid>
|
|||
Id = Guid.NewGuid();
|
||||
CreatedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class AuthorityGroup<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
public TKey Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
|
|
|
@ -2,6 +2,17 @@ namespace DotBased.AspNet.Authority.Models.Authority;
|
|||
|
||||
public abstract class AuthorityRole
|
||||
{
|
||||
public AuthorityRole(string name) : this()
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public AuthorityRole()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
CreatedDate = DateTime.Now;
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user