Files
SharepointToolbox-Web/Core/Models/AppUser.cs
T

19 lines
777 B
C#

namespace SharepointToolbox.Web.Core.Models;
public class AppUser
{
public string Id { get; set; } = Guid.NewGuid().ToString();
public string Email { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public UserRole Role { get; set; } = UserRole.TechN0;
/// <summary>Identity source. Entra = OIDC-provisioned, Local = password-based account.</summary>
public AuthProvider Provider { get; set; } = AuthProvider.Entra;
/// <summary>PasswordHasher output. Only set for <see cref="AuthProvider.Local"/> users.</summary>
public string? PasswordHash { get; set; }
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? LastLogin { get; set; }
}