43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using IRaCIS.Core.Domain.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
|
{
|
|
//public class StudyConfigration : IEntityTypeConfiguration<DicomStudy>
|
|
//{
|
|
|
|
// /// <summary>
|
|
// /// 一个外键,关联多个表 ReadingId
|
|
// /// </summary>
|
|
// /// <param name="builder"></param>
|
|
// public void Configure(EntityTypeBuilder<DicomStudy> builder)
|
|
// {
|
|
|
|
// builder
|
|
// .HasMany(s => s.ReadingClinicalDataList)
|
|
// .WithOne(c => c.DicomStudy)
|
|
// .HasForeignKey(s => new { s.StudyId })
|
|
// .HasPrincipalKey(c => new { c.Id });
|
|
|
|
|
|
// builder
|
|
// .HasMany(s => s.ReadingConsistentClinicalDataList)
|
|
// .WithOne(c => c.DicomStudy)
|
|
// .HasForeignKey(s => new { s.StudyId })
|
|
// .HasPrincipalKey(c => new { c.Id });
|
|
|
|
// }
|
|
//}
|
|
|
|
//public class UserConfigration : IEntityTypeConfiguration<User>
|
|
//{
|
|
// public void Configure(EntityTypeBuilder<User> builder)
|
|
// {
|
|
// //对于阅片人来讲,会有很多任务
|
|
// builder.HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId).IsRequired(false);
|
|
// }
|
|
//}
|
|
}
|