﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace MyProvider.Models
{
	//
	// Summary:
	//     Represents a user in the identity system
	//
	// Type parameters:
	//   TKey:
	//     The type used for the primary key for the user.
	[Serializable]
	public class MyIdentityUser : Microsoft.AspNetCore.Identity.IdentityUser
	{
		//
		// Summary:
		//     Initializes a new instance of Microsoft.AspNetCore.Identity.IdentityUser`1.
		public MyIdentityUser() : base() { }
		//
		// Summary:
		//     Initializes a new instance of Microsoft.AspNetCore.Identity.IdentityUser`1.
		//
		// Parameters:
		//   userName:
		//     The user name.
		public MyIdentityUser(string userName) : base(userName) { }
		//--------------------------------------------------------------------------------------
		// My User
		// Summary:
		//     Gets or sets the primary key for this user.
		[XmlAttribute]
		public override string Id { get; set; }
		//
		// Summary:
		//     Gets or sets the user name for this user.
		public override string UserName { get; set; }
		//
		// Summary:
		//     Gets or sets the email address for this user.
		public override string Email { get; set; }
		//
		// Summary:
		//     Gets or sets a telephone number for the user.
		public override string PhoneNumber { get; set; }

		//--------------------------------------------------------------------------------------
		//
		// Summary:
		//     Gets or sets a salted and hashed representation of the password for this user.
		[XmlIgnore]
		public override string PasswordHash { get; set; }

		//-------------------------------------------
		// 2 Factor + phone from MyUser
		// Summary:
		//     Gets or sets a flag indicating if two factor authentication is enabled for this
		//     user.
		[XmlIgnore]
		public override bool TwoFactorEnabled { get; set; }
		//
		// Summary:
		//     Gets or sets a flag indicating if a user has confirmed their telephone address.
		public override bool PhoneNumberConfirmed { get; set; }

		//-------------------------------------------
		// Stamps
		// Summary:
		//     A random value that must change whenever a user is persisted to the store
		[XmlIgnore]
		public override string ConcurrencyStamp { get; set; }
		//
		// Summary:
		//     A random value that must change whenever a users credentials change (password
		//     changed, login removed)
		[XmlIgnore]
		public override string SecurityStamp { get; set; }

		//-------------------------------------------
		//
		// Summary:
		//     Gets or sets a flag indicating if a user has confirmed their email address.
		[XmlIgnore]
		public override bool EmailConfirmed { get; set; }
		//
		// Summary:
		//     Gets or sets the normalized email address for this user.
		[XmlIgnore]
		public override string NormalizedEmail { get; set; }


		//-------------------------------------------
		//
		// Summary:
		//     Gets or sets the date and time, in UTC, when any user lockout ends.
		//
		// Remarks:
		//     A value in the past means the user is not locked out.
		[XmlIgnore]
		public override DateTimeOffset? LockoutEnd { get; set; }
		//
		// Summary:
		//     Gets or sets a flag indicating if the user could be locked out.
		[XmlIgnore]
		public override bool LockoutEnabled { get; set; }
		//
		// Summary:
		//     Gets or sets the number of failed login attempts for the current user.
		public override int AccessFailedCount { get; set; }

		//--------------------------------------------------------------------------------------
		//
		// Summary:
		//     Returns the username for this user.
		public override string ToString() { return base.ToString(); }

	}
}
