using System;

namespace Aitex.Core.Account
{
    [Serializable]
    public class LoginResult
    {
        #region Constructors

        public LoginResult() : this(LoginRequestResults.Error, Credential.Empty)
        {

        }

        public LoginResult(LoginRequestResults result) : this(result, Credential.Empty)
        {

        }

        public LoginResult(LoginRequestResults result, Credential cred)
        {
            Result = result;
            Credential = cred;
        }

        #endregion
		
		#region Properties

		/// <summary>
		/// 设置或返回是否登录成功。
		/// </summary>
		public LoginRequestResults Result { get; set; }
        
		/// <summary>
		/// 登录凭据。
		/// </summary>
		public Credential Credential { get; set; }

		#endregion
		
		/// <inheritdoc />
		public override string ToString()
		{
			return Result.ToString();
		}
	}
}
