15832d1ae3
Removed all UserType logic and references, replacing them with a new Role model and management system. Introduced RoleManager service, repository, and API endpoint for role CRUD operations. Updated user flows and JWT claims to use RoleCode. Removed admin-only user CRUD endpoints. Updated DI, documentation, and error handling for consistency. Appsettings and DTOs now reflect the new role-based approach.
16 lines
364 B
C#
16 lines
364 B
C#
namespace AuthHex.Models
|
|
{
|
|
public class Role
|
|
{
|
|
public Guid RoleId { get; set; }
|
|
|
|
public string Code { get; set; } = string.Empty; // ADMIN, USER, STAFF
|
|
public string?Name { get; set; } = string.Empty;
|
|
|
|
public bool? IsSystemRole { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
}
|
|
}
|