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

193 lines
4.4 KiB
C#

using EntityFrameworkCore.Projectables;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Domain.Models
{
[Comment("课题组")]
public class HospitalGroup : BaseFullAuditEntity
{
#region 导航属性
[JsonIgnore]
public List<HospitalGroupIdentityUser> IdentityUserList { get; set; }
#endregion
public string Name { get; set; }
public string Code { get; set; }
[Comment("所属科室")]
public string Affiliation { get; set; }
public string ContactName { get; set; }
public string ContactPhone { get; set; }
public string CallingAE { get; set; } = string.Empty;
public bool IsEnable { get; set; }
}
[Comment("用户课题组中间关系表")]
public class HospitalGroupIdentityUser : BaseFullAuditEntity
{
#region 导航属性
[JsonIgnore]
public HospitalGroup HospitalGroup { get; set; }
[JsonIgnore]
public IdentityUser IdentityUser { get; set; }
#endregion
public Guid HospitalGroupId { get; set; }
public Guid IdentityUserId { get; set; }
public bool IsManager { get; set; }
}
[Comment("后台 - 系统真实账户表")]
[Table("IdentityUser")]
public class IdentityUser : BaseFullAuditEntity
{
[JsonIgnore]
public List<TrialIdentityUser> UserTrialList { get; set; }
[JsonIgnore]
public List<UserRole> UserRoleList { get; set; }
[JsonIgnore]
public List<HospitalGroupIdentityUser> IdentityUserHospitalGroupList { get; set; }
[Projectable]
public string FullName => LastName + " / " + FirstName;
[JsonIgnore]
public Trial Trial { get; set; }
public Guid? TrialId { get; set; }
#region 用户信息
public int Code { get; set; }
public string UserCode { get; set; }
public string UserName { get; set; }
public string EMail { get; set; }
[StringLength(1000)]
public string EmailToken { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Password { get; set; }
public bool PasswordChanged { get; set; }
public string Phone { get; set; }
public int? Sex { get; set; }
public UserStateEnum Status { get; set; } = UserStateEnum.Enable;
public string OrganizationName { get; set; }
public string PositionName { get; set; }
[Comment("这个字段废除,放在用户角色上面,后续删除")]
public bool AutoCutNextTask { get; set; }
public string DepartmentName { get; set; }
[Comment("首次登录需要修改密码")]
public bool IsFirstAdd { get; set; } = true;
public bool IsTestUser { get; set; }
[Comment("内部用户 外部用户")]
public bool IsZhiZhun { get; set; }
[Comment("上一次修改密码的时间")]
public DateTime? LastChangePassWordTime { get; set; }
public string LastLoginIP { get; set; }
public DateTime? LastLoginTime { get; set; }
#endregion
#region HIR
public string CheckCode { get; set; } = string.Empty;
//目前是tj医院
public string ThirdUserCode { get; set; } = string.Empty;
#endregion
}
[Comment("项目用户表")]
[Table("TrialIdentityUser")]
public class TrialIdentityUser : BaseFullDeleteAuditEntity
{
#region 导航属性
[JsonIgnore]
public Trial Trial { get; set; }
[JsonIgnore]
[ForeignKey("IdentityUserId")]
public IdentityUser IdentityUser { get; set; }
[JsonIgnore]
public List<TrialUserRole> TrialUserRoleList { get; set; }
#endregion
public Guid TrialId { get; set; }
public Guid IdentityUserId { get; set; }
public DateTime? RemoveTime { get; set; }
public DateTime? JoinTime { get; set; }
}
public class CmoveStudy : BaseFullAuditEntity
{
public List<string> StudyInstanceUIDList { get; set; }
public string CallingAE { get; set; }
public string CalledAE { get; set; }
public List<Guid> HopitalGroupIdList { get; set; }
}
}