using System;

namespace InABox.Core
{
    [UserTracking(false)]
    [Unrecoverable]
    public class Login : Entity, IRemotable, IPersistent, ILicense<CoreLicense>
    {
        public UserLink User => InitializeField(ref _user, nameof(User));
        private UserLink? _user;

        public string StationID { get; set; }

        public DateTime TimeStamp { get; set; }

        public override string ToString()
        {
            return $"Login(UserGuid:{User.ID},User:{User.UserID},Station:{StationID},Time:{TimeStamp})";
        }
    }
}