Uat_Study
hang 2022-07-26 13:18:19 +08:00
parent 839d72f05a
commit 39844dc8a4
3 changed files with 9 additions and 11 deletions

View File

@ -35,6 +35,14 @@ namespace IRaCIS.Core.Domain.Models
public Enroll Enroll { get; set; }
public Guid DoctorUserId { get; set; }
[ForeignKey("DoctorUserId")]
public User DoctorUser { get; set; }
@ -42,11 +50,7 @@ namespace IRaCIS.Core.Domain.Models
//是否是裁判医生 裁判医生单独加入
public bool IsJudgeDoctor { get; set; }
public Guid DoctorUserId { get; set; }
[ForeignKey("DoctorUserId")]
public User DoctorUser { get; set; }
public int PlanReadingRatio { get; set; }

View File

@ -100,7 +100,6 @@ namespace IRaCIS.Core.Domain.Models
//public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
public Enroll Enroll { get; set; }
public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }

View File

@ -90,13 +90,8 @@ namespace IRaCIS.Core.Infra.EFCore
modelBuilder.Entity<User>().HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId);
modelBuilder.Entity<User>().HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId).IsRequired(false);
//modelBuilder.Entity<Enroll>().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.Enroll).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }).IsRequired(false);
//modelBuilder.Entity<VisitTask>().HasOne(t => t.Enroll).WithMany(t => t.DoctorTrialVisitTaskList).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).IsRequired(false).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }).IsRequired(false);
//modelBuilder.Entity<TaskAllocationRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });