using XF.Domain.Authentications;

namespace Hotline.Authentications
{
    public class Police110SessionContext : ISessionContext
    {
        public Police110SessionContext()
        {
            UserId = "e90501d7-c453-e18a-f1fa-3a1177930699";
            UserName = "市公安局110";
            OrgId = "001180";
            OrgName = "市公安局110";
            OrgLevel = 1;
        }

        /// <summary>
        /// Id of current tenant or null for host
        /// </summary>
        public string? UserId { get; }

        /// <summary>
        /// Id of current user or throw Exception for guest
        /// </summary>
        public string RequiredUserId => UserId ?? throw new ArgumentNullException();
        public string? UserName { get; }
        public string? Phone { get; }

        /// <summary>
        /// Roles
        /// </summary>
        public string[] Roles { get; }
        public string? OrgId { get; set; }
        public string RequiredOrgId => OrgId ?? throw new ArgumentNullException();
        public string? OrgName { get; set; }
        public int OrgLevel { get; set; }
        public string? OrgAreaCode { get; set; }
        public bool OrgIsCenter { get; set; }

        /// <summary>
        /// 部门行政区划名称
        /// </summary>
        public string? OrgAreaName { get; set; }
        public string? AreaId { get; }
        public string? ClientId { get; }

        /// <summary>
        /// 工号
        /// </summary>
        public string? StaffNo { get; }
    }
}
