using System;
using CommonHelpers;

namespace MyFlat
{
   /// <summary>
   /// Authorization main info
   /// </summary>
   public class AuthorizationInfo
   {
      public string LoginName { get; set; }
      public DateTime LoginTime { get; set; }
      public string UserInitials { get; set; }
      public bool IsAdministrator { get; set; }
      public DateTime RegistrationDate { get; set; }
      internal AuthorizationInfo( string loginName, string userInitials,
                                  bool isAdministrator, DateTime registrationDate )
      {
         LoginName = loginName;
         LoginTime = DateTime.Now;
         UserInitials = userInitials;
         IsAdministrator = isAdministrator;
         RegistrationDate = registrationDate;
      }
      public AuthorizationInfo AuthorizationInfo_Duplicate() =>
         (AuthorizationInfo)MemberwiseClone();
   }
}
