using System.ComponentModel; using Hotline.Identity.Accounts; using Hotline.Identity.Roles; using Hotline.Settings; using Hotline.Share.Enums.Order; using Hotline.Share.Enums.User; using SqlSugar; using XF.Domain.Entities; using XF.Domain.Repository; namespace Hotline.Users { /// /// 用户 /// [Description("用户")] public class User : CreationSoftDeleteEntity { /// /// 手机号(冗余) /// public string? PhoneNo { get; set; } /// /// 展示名称(Identity.DisplayName) /// public string Name { get; set; } public EGender Gender { get; set; } /// /// 工号 /// public string? StaffNo { get; set; } /// /// 部门Id /// public string? OrgId { get; set; } /// /// 默认分机号 /// public string? DefaultTelNo { get; set; } /// /// 用户类型 /// public EUserType UserType { get; set; } /// /// 旧系统用户id /// public int? OldUserId { get; set; } /// /// 所属部门 /// [Navigate(NavigateType.OneToOne, nameof(OrgId))] public SystemOrganize Organization { get; set; } [Navigate(NavigateType.OneToOne, nameof(Id))] public Account Account { get; set; } [Navigate(typeof(AccountRole), nameof(AccountRole.AccountId), nameof(AccountRole.RoleId))] public List Roles { get; set; } } }