CodeLiturgy.Dashboard/BlueWest.Data.Application/ApplicationUser/ApplicationUser.cs

106 lines
3.7 KiB
C#
Raw Normal View History

2022-09-10 00:33:17 +03:00
using System;
2022-09-10 07:28:41 +03:00
using System.Collections.Generic;
2022-09-10 07:12:03 +03:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2022-09-10 07:28:41 +03:00
using BlueWest.Data;
2022-09-17 22:13:35 +03:00
using BlueWest.Data.Application;
2022-09-12 17:57:37 +03:00
using MapTo;
2022-09-10 00:33:17 +03:00
using Microsoft.AspNetCore.Identity;
2022-09-12 17:57:37 +03:00
namespace BlueWest.WebApi.Context.Users
2022-09-10 00:33:17 +03:00
{
2022-09-12 17:57:37 +03:00
/// <summary>
/// Application User in the Identity System.
/// </summary>
[MapFrom(typeof(ApplicationUserUnique))]
[UseUpdate]
public partial class ApplicationUser : IdentityUser<string>
{
2022-09-10 00:33:17 +03:00
/// <summary>
/// Gets or sets the primary key for this user.
/// </summary>
2022-09-12 17:57:37 +03:00
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[PersonalData]
2022-09-17 22:13:35 +03:00
public override string Id { get; set; }
2022-09-10 00:33:17 +03:00
[ProtectedPersonalData]
public override string UserName { get; set; }
public override string NormalizedUserName { get; set; }
[ProtectedPersonalData]
public override string Email { get; set; }
/// <summary>
/// Gets or sets the normalized email address for this user.
/// </summary>
public override string NormalizedEmail { get; set; }
/// <summary>
/// Gets or sets a flag indicating if a user has confirmed their email address.
/// </summary>
/// <value>True if the email address has been confirmed, otherwise false.</value>
[PersonalData]
public override bool EmailConfirmed { get; set; }
/// <summary>
/// Gets or sets a salted and hashed representation of the password for this user.
/// </summary>
public override string PasswordHash { get; set; }
/// <summary>
/// A random value that must change whenever a users credentials change (password changed, login removed)
/// </summary>
public override string SecurityStamp { get; set; }
/// <summary>
/// A random value that must change whenever a user is persisted to the store
/// </summary>
public override string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// Gets or sets a telephone number for the user.
/// </summary>
[ProtectedPersonalData]
public override string PhoneNumber { get; set; }
/// <summary>
/// Gets or sets a flag indicating if a user has confirmed their telephone address.
/// </summary>
/// <value>True if the telephone number has been confirmed, otherwise false.</value>
[PersonalData]
public override bool PhoneNumberConfirmed { get; set; }
/// <summary>
/// Gets or sets a flag indicating if two factor authentication is enabled for this user.
/// </summary>
/// <value>True if 2fa is enabled, otherwise false.</value>
[PersonalData]
public override bool TwoFactorEnabled { get; set; }
/// <summary>
/// Gets or sets the date and time, in UTC, when any user lockout ends.
/// </summary>
/// <remarks>
/// A value in the past means the user is not locked out.
/// </remarks>
public override DateTimeOffset? LockoutEnd { get; set; }
/// <summary>
/// Gets or sets a flag indicating if the user could be locked out.
/// </summary>
/// <value>True if the user could be locked out, otherwise false.</value>
public override bool LockoutEnabled { get; set; }
/// <summary>
/// Gets or sets the number of failed login attempts for the current user.
/// </summary>
public override int AccessFailedCount { get; set; }
2022-09-17 22:13:35 +03:00
public List<SessionToken> SessionToken { get; set; }
public List<SessionData> SessionDatas { get; set; }
2022-09-12 17:57:37 +03:00
}
2022-09-10 00:33:17 +03:00
}