irc-netcore-api/IRaCIS.Core.Domain/Management/User.cs

103 lines
2.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EntityFrameworkCore.Projectables;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models
{
[Table("User")]
public partial class User : BaseFullAuditEntity
{
#region 导航属性
[ForeignKey("UserTypeId")]
public UserType UserTypeRole { get; set; }
[JsonIgnore]
public List<SystemDocConfirmedUser> SystemDocConfirmedList { get; set; }
[JsonIgnore]
public List<TrialUser> UserTrials { get; set; } = new List<TrialUser>();
[JsonIgnore]
public List<VisitTask> VisitTaskList { get; set; }
[JsonIgnore]
[ForeignKey("DoctorId")]
public Doctor Doctor { get; set; }
#endregion
[StringLength(255)]
public string UserName { get; set; } = String.Empty;
[StringLength(255)]
public string Password { get; set; } = String.Empty;
[StringLength(255)]
public string LastName { get; set; } = String.Empty;
public string FirstName { get; set; } = String.Empty;
public string Phone { get; set; } = string.Empty;
public string EMail { get; set; } = string.Empty;
public int? Sex { get; set; }
public UserStateEnum Status { get; set; } = UserStateEnum.Enable;
public DateTime? LastLoginTime { get; set; }
public Guid UserTypeId { get; set; } = Guid.Empty;
// 内部用户 外部用户
public bool IsZhiZhun { get; set; }
public UserTypeEnum UserTypeEnum { get; set; }
public string OrganizationName { get; set; } = String.Empty;
public bool PasswordChanged { get; set; }
public string UserCode { get; set; } = string.Empty;
public int Code { get; set; }
public string DepartmentName { get; set; } = String.Empty;
public string PositionName { get; set; } = String.Empty;
public bool IsFirstAdd { get; set; } = true;
public string EmailToken { get; set; } = string.Empty;
/// <summary>
/// 上一次修改密码的时间
/// </summary>
public DateTime? LastChangePassWordTime { get; set; }
/// <summary>
/// LastLoginIP
/// </summary>
public string LastLoginIP { get; set; } = string.Empty;
//医生生成账号后,会有值
public Guid? DoctorId { get; set; }
public bool IsTestUser { get; set; }
/// <summary>
/// 自动切换下一个任务
/// </summary>
public bool AutoCutNextTask { get; set; } = false;
[Projectable]
public string FullName => LastName + " / " + FirstName;
//[Projectable] public string FullName => $"{LastName} / {FirstName}";
}
}