28 lines
1019 B
C#
28 lines
1019 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
namespace LaDOSE.Entity
|
|
{
|
|
public class ApplicationUser
|
|
{
|
|
public int Id { get; set; }
|
|
public string FirstName { get; set; }
|
|
public string LastName { get; set; }
|
|
public string Username { get; set; }
|
|
[NotMapped]
|
|
public string Password { get; set; }
|
|
public byte[] PasswordHash { get; set; }
|
|
public byte[] PasswordSalt { get; set; }
|
|
|
|
/// <summary>
|
|
/// Rows of the <c>applicationuserrole</c> join table for this user. Only populated
|
|
/// when the query asks for it — see UserService, which includes it (and the role
|
|
/// itself) everywhere the role matters; authorization reads this on every request.
|
|
/// Prefer the <see cref="Roles.Names"/> / <see cref="Roles.IsAdmin"/> helpers.
|
|
/// </summary>
|
|
public List<ApplicationUserRole> UserRoles { get; set; }
|
|
}
|
|
|
|
} |