using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace PositioningWebApp.Models.UserProfile
{
	public class UserProfile
	{
		#region Properties  

		public int ID { get; set; }
		/// <summary>  
		/// Gets or sets to first name.  
		/// </summary>  
		[Display(Name = "First name")]
		public string FirstName { get; set; }

		/// <summary>  
		/// Gets or sets to surname.  
		/// </summary>  
		[Display(Name = "Surname")]
		public string Surname { get; set; }

		/// <summary>  
		/// Gets or sets to username address.  
		/// </summary>  
		[Display(Name = "Email")]
		public string Email { get; set; }

		/// <summary>  
		/// Gets or sets to password address.  
		/// </summary>  
		[DataType(DataType.Password)]
		[Display(Name = "Password")]
		[RegularExpression(@"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$", ErrorMessage = "Passwor should have at least 8 characters, at least 1 number and 1 letter.")]
		public string Password { get; set; }

		/// <summary>  
		/// Gets or sets to password address.  
		/// </summary>  
		[DataType(DataType.Password)]
		[Display(Name = "Repeat password")]
		public string Password2 { get; set; }

		[DataType(DataType.PhoneNumber)]
		[RegularExpression(@"^(\+420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$", ErrorMessage = "The PhoneNumber field is not a valid phone number")]
		public string Phone { get; set; }

		#endregion
	}
}
