using System.Security.Authentication;

namespace XF.Domain.Authentications;

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

    /// <summary>
    /// Id of current user or throw Exception for guest
    /// </summary>
    /// <exception cref="AuthenticationException"></exception>
    string RequiredUserId { get; }

    string? UserName { get; }

    string? Phone { get; }

    /// <summary>
    /// Roles
    /// </summary>
    string[] Roles { get; }

    string? OrgId { get; set; }
    string RequiredOrgId { get; }

    string? OrgName { get; set; }
    int OrgLevel { get; set; }
    string? OrgAreaCode { get; set; }
    bool OrgIsCenter { get; set; }

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

    string? AreaId { get; }

    string? ClientId { get; }

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