[CHANGE] Building data structure
This commit is contained in:
0
DotBased.AspNet.Authority/Models/Authority/AuthorityAttribute.cs
Normal file → Executable file
0
DotBased.AspNet.Authority/Models/Authority/AuthorityAttribute.cs
Normal file → Executable file
0
DotBased.AspNet.Authority/Models/Authority/AuthorityGroup.cs
Normal file → Executable file
0
DotBased.AspNet.Authority/Models/Authority/AuthorityGroup.cs
Normal file → Executable file
16
DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs
Normal file → Executable file
16
DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs
Normal file → Executable file
@@ -1,25 +1,19 @@
|
||||
namespace DotBased.AspNet.Authority.Models.Authority;
|
||||
|
||||
public abstract class AuthorityRole
|
||||
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 Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public long Version { get; set; }
|
||||
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
|
||||
public override string ToString() => Name ?? string.Empty;
|
||||
}
|
16
DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs
Normal file → Executable file
16
DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs
Normal file → Executable file
@@ -2,21 +2,15 @@ using DotBased.AspNet.Authority.Attributes;
|
||||
|
||||
namespace DotBased.AspNet.Authority.Models.Authority;
|
||||
|
||||
public class AuthorityUser
|
||||
public class AuthorityUser()
|
||||
{
|
||||
public AuthorityUser(string userName) : this()
|
||||
{
|
||||
UserName = userName;
|
||||
}
|
||||
|
||||
public AuthorityUser()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
CreatedDate = DateTime.Now;
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public bool Confirmed { get; set; }
|
||||
@@ -29,7 +23,7 @@ public class AuthorityUser
|
||||
|
||||
public string? PasswordHash { get; set; }
|
||||
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
|
||||
public bool TwoFactorEnabled { get; set; }
|
||||
|
||||
|
Reference in New Issue
Block a user