[ADD] Adding models, repositories. Implementing business logic.

This commit is contained in:
max
2024-12-22 02:15:34 +01:00
parent 7ebe1e1752
commit 44e64793b7
12 changed files with 147 additions and 41 deletions

View File

@@ -0,0 +1,28 @@
namespace DotBased.AspNet.Authority.Models.Authority;
public class AuthorityRole : AuthorityRole<Guid>
{
public AuthorityRole(string name) : this()
{
Name = name;
}
public AuthorityRole()
{
Id = Guid.NewGuid();
CreatedDate = DateTime.Now;
}
}
public abstract class AuthorityRole<TKey> where TKey : IEquatable<TKey>
{
public TKey Id { get; set; }
public string? Name { get; set; }
public long Version { get; set; }
public DateTime CreatedDate { get; set; }
public override string ToString() => Name ?? string.Empty;
}