using Hotline.Configurations; using XF.Domain.Authentications; namespace Hotline.Authentications { public class ProvinceSessionContext : ISessionContext { public ProvinceSessionContext(CityProvinceConfiguration config) { UserId = config.UserId; UserName = config.UserName; OrgId = config.OrgId; OrgName = config.OrgName; OrgLevel = 1; } //取消写入 /// /// Id of current tenant or null for host /// public string? UserId { get; } /// /// Id of current user or throw Exception for guest /// /// public string RequiredUserId => UserId ?? throw new ArgumentNullException(); //取消写入 public string? UserName { get; } public string? Phone { get; } /// /// Roles /// 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; } /// /// 部门行政区划名称 /// public string? OrgAreaName { get; set; } public string? AreaId { get; } public string? ClientId { get; } /// /// 工号 /// public string? StaffNo { get; } } }