* Maintain DataModel for User, Role, Function and UserRole

This commit is contained in:
2025-02-20 05:20:30 +01:00
parent c2078d1614
commit cd5990039d
21 changed files with 740 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
namespace OrdersManagementDataModel.Entities;
public class Function
{
public int Id { get; set; }
public int RoleId { get; set; }
public string Name { get; set; }
public Guid RowPointer { get; set; }
public Role Role { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace OrdersManagementDataModel.Entities;
public class Role
{
public int Id { get; set; }
public string Name { get; set; }
public Guid RowPointer { get; set; }
}

View File

@@ -0,0 +1,23 @@
namespace OrdersManagementDataModel.Entities;
public class User
{
public int Id { get; set; }
public string Login { get; set; }
public string PasswordHash { get; set; }
public bool IsTemporaryPassword { get; set; }
public bool IsActive { get; set; }
public DateTime? ActiveFrom { get; set; }
public DateTime? ActiveTo { get; set; }
public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime? LastLoginDate { get; set; }
public int FailedLoginAttempts { get; set; }
public bool IsLocked { get; set; }
public DateTime? LockoutEndDate { get; set; }
public Guid RowPointer { get; set; }
public ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
}

View File

@@ -0,0 +1,11 @@
namespace OrdersManagementDataModel.Entities;
public class UserRole
{
public int UserId { get; set; }
public int RoleId { get; set; }
public Guid RowPointer { get; set; }
public virtual User User { get; set; }
public virtual Role Role { get; set; }
}