using System;
using System.Collections.Generic;

namespace MECF.Framework.Common.Account.Extends
{
	[Serializable]
	public class AccountEx
	{
		#region Variables
		
		private string _mStrUserId;
		private string _mStrLoginName;
		private string _mStrFirstName;
		private string _mStrLastName;
		private string _mStrEmail;
		private string _mStrDescription;
		private string _mStrPassword;
		private List<string> _mStrRoles;
        
		#endregion

		#region Constructors

		public AccountEx()
		{
			
		}

		public AccountEx(string id, string loginName, string password, string firstName, string lastName, string email,
			List<string> rolesBelongTo, string description = "")
		{
			_mStrUserId = id;
			_mStrLoginName = loginName;
			_mStrFirstName = firstName;
			_mStrLastName = lastName;
			_mStrEmail = email;
			_mStrDescription = description;
			_mStrPassword = password;
			_mStrRoles = rolesBelongTo;
			IsSuper = false;
		}

		#endregion

		#region Properties

		/// <summary>
		/// 设置或返回账号ID。
		/// </summary>
		public string UserId
		{
			get => _mStrUserId;
			set => _mStrUserId = value;
		}

		/// <summary>
		/// 设置或返回账号登录名称。
		/// </summary>
		public string LoginName
		{
			get => _mStrLoginName;
			set => _mStrLoginName = value;
		}

		/// <summary>
		/// 设置或返回用户姓名。
		/// </summary>
		public string FirstName
		{
			get => _mStrFirstName;
			set => _mStrFirstName = value;
		}

		/// <summary>
		/// 设置或返回用户姓名。
		/// </summary>
		public string LastName
		{
			get => _mStrLastName;
			set => _mStrLastName = value;
		}

		/// <summary>
        /// 设置或返回电子邮件地址。
        /// </summary>
		public string Email
		{
			get => _mStrEmail;
			set => _mStrEmail = value;
		}

		/// <summary>
		/// 设置或返回账号描述。
		/// </summary>
		public string Description
		{
			get => _mStrDescription;
			set => _mStrDescription = value;
		}

		/// <summary>
		/// 设置或返回加密后的登录密码。
		/// </summary>
		public string Password
		{
			get => _mStrPassword;
			set => _mStrPassword = value;
		}
        
		/// <summary>
		/// 设置或返回当前用户是否为超级用户。
		/// </summary>
		public bool IsSuper { get; set; }

		/// <summary>
		/// 设置或返回当前账户所属角色。
		/// </summary>
		public List<string> RoleIDs
		{
			get => _mStrRoles;
			set => _mStrRoles = value;
		}
		
		#endregion
	}
}
