From e358601232783b3c478e02d590c6bd757462d9a6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 9 Jan 2026 14:44:11 +0800 Subject: [PATCH 01/36] =?UTF-8?q?EA=20=E5=8F=AA=E7=9C=8B=E5=B7=B2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/TrialDocumentService.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 94ee34937..ac4d047ed 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Services { IsPublish = true, IsDeleted = false, - },false,true); + }, false, true); await _trialDocumentRepository.SaveChangesAsync(); Console.WriteLine("开始 发布项目文档"); @@ -150,7 +150,7 @@ namespace IRaCIS.Core.Application.Services { // 从新作用域解析服务 var mediator = scope.ServiceProvider.GetRequiredService(); - await mediator.Publish(new ImageQCRecurringEvent { TrialId= Guid.Parse("08de2254-5d7d-581a-0242-0a0001000000") }); + await mediator.Publish(new ImageQCRecurringEvent { TrialId = Guid.Parse("08de2254-5d7d-581a-0242-0a0001000000") }); } }); return ResponseOutput.Result(true); @@ -171,7 +171,7 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId)) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) .WhereIf(inQuery.IsPublish != null, t => t.IsPublish == inQuery.IsPublish) - .WhereIf(!string.IsNullOrEmpty(inQuery.FileTypeCode), t => t.FileType.Code== inQuery.FileTypeCode) + .WhereIf(!string.IsNullOrEmpty(inQuery.FileTypeCode), t => t.FileType.Code == inQuery.FileTypeCode) .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us }); return await trialDocumentQueryable.ToPagedListAsync(inQuery); @@ -180,7 +180,7 @@ namespace IRaCIS.Core.Application.Services [HttpPost] public async Task> GetTrialSignDocumentList(TrialDocQuery inQuery) { - var trialDocQueryable = from trialDoc in _trialDocumentRepository.Where(t=>t.IsPublish) + var trialDocQueryable = from trialDoc in _trialDocumentRepository.Where(t => t.IsPublish) .WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId) .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) @@ -353,7 +353,7 @@ namespace IRaCIS.Core.Application.Services #region 统一用户修改 var systemDocQuery = - from sysDoc in _systemDocumentRepository.Where(t=>t.IsPublish).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + from sysDoc in _systemDocumentRepository.Where(t => t.IsPublish).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) //外部人员 只签署 外部需要签署的 .WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter) from trialUser in _trialIdentityUserRepository.AsQueryable(false) @@ -392,7 +392,7 @@ namespace IRaCIS.Core.Application.Services //项目文档查询 var trialDocQuery = - from trialDoc in _trialDocumentRepository.Where(t=>t.IsPublish).Where(t => t.TrialId == inQuery.TrialId).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + from trialDoc in _trialDocumentRepository.Where(t => t.IsPublish).Where(t => t.TrialId == inQuery.TrialId).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId && t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))) @@ -582,7 +582,7 @@ namespace IRaCIS.Core.Application.Services #endregion - var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t=>t.IsPublish) + var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t => t.IsPublish) .Where(t => t.TrialId == inQuery.TrialId && t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped) .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) @@ -713,7 +713,8 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted); + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA, t => t.ConfirmTime != null); var result = await unionQuery.ToPagedListAsync(inQuery); @@ -945,7 +946,7 @@ namespace IRaCIS.Core.Application.Services var isEA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA; //EA 但是没有在进行的培训记录查看权限,那么返回空数据 - if (isEA && !_auditRecordRepository.Any(t => t.IsViewTrainingRecord && t.AuditState == AuditState.Ongoing && t.AuditRecordIdentityUserList.Any(c=>c.IdentityUserId==_userInfo.IdentityUserId))) + if (isEA && !_auditRecordRepository.Any(t => t.IsViewTrainingRecord && t.AuditState == AuditState.Ongoing && t.AuditRecordIdentityUserList.Any(c => c.IdentityUserId == _userInfo.IdentityUserId))) { return ResponseOutput.Ok(new PageOutput()); } @@ -1113,7 +1114,7 @@ namespace IRaCIS.Core.Application.Services _mapper.Map(addOrEditTrialDocument, document); document.UpdateTime = DateTime.Now; - + #region 不区分路径了 //if (document.FileTypeId != addOrEditTrialDocument.FileTypeId) From a5155457b1eb9211ab11d806434bd9db41af9926 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 9 Jan 2026 14:46:39 +0800 Subject: [PATCH 02/36] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index a7182f8af..58fdf1137 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -338,6 +338,7 @@ namespace IRaCIS.Core.Application.Service trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; + trial.EmailFromName = $"{_systemEmailConfig.FromName}-{trial.TrialCode}"; trial.UpdateTime = DateTime.Now; From ccf16423d23414fe7d19c3736bd78d069ece6791 Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Sat, 10 Jan 2026 19:30:47 +0800 Subject: [PATCH 03/36] =?UTF-8?q?=E5=90=8E=E6=9C=9F=E8=A1=A8=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E7=B1=BB=E5=9E=8B=E6=9B=B4=E6=94=B9=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=BD=B1=E5=93=8D=E4=B9=8B=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/TestService.cs | 20 + IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 | 5 +- .../Context/IRaCISDBContext.cs | 37 +- .../20260110112346_clusterModify.Designer.cs | 21464 ++++++++++++++++ .../20260110112346_clusterModify.cs | 10715 ++++++++ .../IRaCISDBContextModelSnapshot.cs | 1491 +- 6 files changed, 33038 insertions(+), 694 deletions(-) create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.Designer.cs create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.cs diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index c98bf2044..d7fba97a9 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -12,6 +12,7 @@ using IRaCIS.Core.Domain; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; +using IRaCIS.Core.Infra.EFCore.Context; using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Infrastructure.Encryption; using IRaCIS.Core.Infrastructure.NewtonsoftJson; @@ -75,6 +76,25 @@ namespace IRaCIS.Core.Application.Service { public static int IntValue = 100; + + [AllowAnonymous] + + public async Task CreatNewDBStruct() + { + var factory = new IRaCISDBContextFactory(); + + using var db = factory.CreateDbContext(Array.Empty()); + + // ⚠️ 临时用,确认是测试库 + // db.Database.EnsureDeleted(); + + db.Database.EnsureCreated(); + + Console.WriteLine("数据库结构已创建完成"); + + return ResponseOutput.Ok(); + } + [AllowAnonymous] public async Task TestOSS(StorageClass storageClass) { diff --git a/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 b/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 index 9471d9f9c..3a4bad769 100644 --- a/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 +++ b/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 @@ -52,4 +52,7 @@ 5һָ from ǨƵָ to ǨƵ SQL ű - dotnet ef migrations script from to -p IRaCIS.Core.Infra.EFCore \ No newline at end of file + dotnet ef migrations script from to -p IRaCIS.Core.Infra.EFCore + +6鿴Ǩб +dotnet ef migrations list -p IRaCIS.Core.Infra.EFCore \ No newline at end of file diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index d0fb4b2dc..53457b3cb 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -6,6 +6,7 @@ using IRaCIS.Core.Infrastructure.Extention; using Microsoft.EntityFrameworkCore.Metadata.Conventions; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.VisualBasic; using Newtonsoft.Json; using System.ComponentModel; using System.ComponentModel.DataAnnotations; @@ -60,8 +61,13 @@ public class IRaCISDBContext : DbContext //针对字符串使用默认的长度配置为200,如果标注了StringLength 其他长度,就是标注的长度,如果标注了MaxLength 那么就是nvarcharMax configurationBuilder.Conventions.Add(_ => new DefaultStringLengthConvention(400)); + //configurationBuilder.Conventions.Add(_ => new RemoveForeignKeyConvention()); + + //控制外键索引生成与否 //https://learn.microsoft.com/zh-cn/ef/core/modeling/relationships/conventions?utm_source=chatgpt.com - //configurationBuilder.Conventions.Remove(typeof(ForeignKeyIndexConvention)); + configurationBuilder.Conventions.Remove(typeof(ForeignKeyIndexConvention)); + + } protected override void OnModelCreating(ModelBuilder modelBuilder) @@ -116,6 +122,7 @@ public class IRaCISDBContext : DbContext #region decimal 自定义精度,适配多种数据库 + foreach (var entityType in modelBuilder.Model.GetEntityTypes()) { foreach (var property in entityType.GetProperties()) @@ -142,6 +149,12 @@ public class IRaCISDBContext : DbContext } } + //用户名区分大小写 + modelBuilder.Entity(entity => + { + entity.Property(e => e.UserName) + .UseCollation("Chinese_PRC_CS_AS"); + }); #endregion //遍历实体模型手动配置 @@ -160,6 +173,26 @@ public class IRaCISDBContext : DbContext foreach (var entityType in modelBuilder.Model.GetEntityTypes()) { + #region 修改Id 聚集索引-> Id非聚集,CreateTime聚集索引,方便分区 + + // 1️ 所有 Entity:Id 为主键(非聚集) + if (typeof(Entity).IsAssignableFrom(entityType.ClrType)) + { + modelBuilder.Entity(entityType.ClrType) + .HasKey(nameof(Entity.Id)) + .IsClustered(false); + } + + // 2️ 所有 IAuditAdd:CreateTime 为聚集索引 + if (typeof(IAuditAdd).IsAssignableFrom(entityType.ClrType)) + { + modelBuilder.Entity(entityType.ClrType) + .HasIndex(nameof(IAuditAdd.CreateTime)) + .IsClustered(); + } + + #endregion + // 软删除配置 if (typeof(ISoftDelete).IsAssignableFrom(entityType.ClrType)) { @@ -694,7 +727,7 @@ public class IRaCISDBContext : DbContext public virtual DbSet AuditDocumentClosure { get; set; } - + } public class TestLength : Entity diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.Designer.cs new file mode 100644 index 000000000..e7bc501c2 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.Designer.cs @@ -0,0 +1,21464 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20260110112346_clusterModify")] + partial class clusterModify + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.19") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditDocumentTypeEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsAuthorization") + .HasColumnType("bit"); + + b.Property("MainFileId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditDocument", t => + { + t.HasComment("稽查文档管理"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocumentClosure", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AncestorId") + .HasColumnType("uniqueidentifier") + .HasComment("祖先"); + + b.Property("Depth") + .HasColumnType("int"); + + b.Property("DescendantId") + .HasColumnType("uniqueidentifier") + .HasComment("后代"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("AuditDocumentClosure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("稽查状态"); + + b.Property("AuditTime") + .HasColumnType("date") + .HasComment("稽查日期"); + + b.Property("AuditType") + .HasColumnType("int") + .HasComment("稽查形式"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("CompanyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("IsViewTrainingRecord") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecordIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordPermission", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecordPermission"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EnFileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EnPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EnFileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EnPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionKeyFileRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionKeyFileRead", t => + { + t.HasComment("标准阅读关键点"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("RealUrlAndEntity") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModifyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailAttachmentLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachmentPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailAttachmentLog", t => + { + t.HasComment("邮件附件日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailDate") + .HasColumnType("datetime2"); + + b.Property("EmailStateEnum") + .HasColumnType("int"); + + b.Property("EmailSubject") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ErrorInfo") + .IsRequired() + .HasMaxLength(5000) + .HasColumnType("nvarchar(max)"); + + b.Property("MessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SenderAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SenderName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniqueId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailLog", t => + { + t.HasComment("邮件日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeList") + .HasColumnType("nvarchar(max)") + .HasComment("邮件配置的多个标准"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailReSendLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MainMailMessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReMailMessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailReSendLog", t => + { + t.HasComment("邮件重发日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailRecipientLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("RecipientAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecipientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecipientTypeEnum") + .HasColumnType("int"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailRecipientLog", t => + { + t.HasComment("邮件收件人"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplyCriterionList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsBeforeModifyView") + .HasColumnType("bit"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsDefaultChoice") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PrivacyPolicyId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserAgreementId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCeateSource") + .HasColumnType("int"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .UseCollation("Chinese_PRC_CS_AS"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckState") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResultPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModifyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageLabelNoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadModuleAddTypeEnum") + .HasColumnType("int"); + + b.Property("ReadingPeriodPlanId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingImportFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingImportFile", t => + { + t.HasComment("阅片导入表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoneDicomFileId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingNoneDicomMark", t => + { + t.HasComment("项目阅片 - 非Dicom标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("NoneDicomMarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingNoneDicomMarkBinding", t => + { + t.HasComment("项目阅片 - 非Dicom标记绑定"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("GeneratedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGenerate") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingToolList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ReadingVersionEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExcludeShowVisitList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("ImageMarkEnum") + .HasColumnType("int"); + + b.Property("ImageTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageToolAttribute") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("IdentityRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPreinstall") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("ImageMarkEnum") + .HasColumnType("int"); + + b.Property("ImageTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageToolAttribute") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsPreinstall") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("PCWGInterimAnswer") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomTagId") + .HasColumnType("uniqueidentifier"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadJsonStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFaild") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsSubjectQuit") + .HasColumnType("bit") + .HasComment("受试者退出"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("SuspendReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("访视中止原因"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int") + .HasComment("一致性核查 回退"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SecondReviewState") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisitImageBackRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ApplyUserRole") + .HasColumnType("int"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ImageBackState") + .HasColumnType("int") + .HasComment("影像上传 回退"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectVisitImageBackRecord", t => + { + t.HasComment("受试者访视影像回退记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SysFileType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveTypeEnum") + .HasColumnType("int") + .HasComment("报告、文档、记录"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmRecord") + .HasColumnType("bit") + .HasComment("是否确认收入项"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("SubIdentificationEnum") + .HasColumnType("int") + .HasComment("子类标识,是取那个表的数据"); + + b.Property("SysTemplateTypeEnum") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SysFileType", t => + { + t.HasComment("后台 - 系统文件类型表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionKeyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemCriterionKeyFile", t => + { + t.HasComment("系统标准阅片关键点文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentStaffTrainDays") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublish") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NewStaffTrainDays") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OffLine") + .HasColumnType("bit"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocumentAttachment", t => + { + t.HasComment("后台 - 系统签署文档附件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("ImageFormatList") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsExternalViewTrialChart") + .HasColumnType("bit") + .HasComment("外部人员 查看项目报表"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsIQCAutoNextTask") + .HasColumnType("bit"); + + b.Property("IsIQCAutoTaskDistinguishType") + .HasColumnType("bit"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsShowStudyName") + .HasColumnType("bit"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialAuditShow", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FrontAuditConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsShow") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialAuditShow"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionKeyFile", t => + { + t.HasComment("项目标准阅片关键点文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentStaffTrainDays") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublish") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NewStaffTrainDays") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OffLine") + .HasColumnType("bit"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocumentAttachment", t => + { + t.HasComment("项目签署文档附件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("后续删除,需要维护数据"); + + b.Property("CriterionTypeList") + .HasColumnType("nvarchar(max)") + .HasComment("邮件配置的多个标准"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("下次版本删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFile", t => + { + t.HasComment("项目文件 - 文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveTypeEnum") + .HasColumnType("int") + .HasComment("报告、文档、记录"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("文件Id"); + + b.Property("FirstFinalDate") + .HasColumnType("date") + .HasComment("首次定稿日期"); + + b.Property("IsConfirmRecord") + .HasColumnType("bit") + .HasComment("是否确认收入项"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsSelfDefine") + .HasColumnType("bit") + .HasComment("是否自定义"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("SubIdentificationEnum") + .HasColumnType("int") + .HasComment("子类标识,是取那个表的数据"); + + b.Property("SysFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联系统文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFileType", t => + { + t.HasComment("项目文件 - 文件类型表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史记录"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PDFFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("定稿PDF"); + + b.Property("SignFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("签名页"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WordFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("定稿Word"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFinalRecord", t => + { + t.HasComment("项目文件 - 定稿记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialHistoryRecordFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialHistoryRecordFile"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史文件"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("关联具体的文件记录,记录里面有大小,格式,名称"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialNormalRecord", t => + { + t.HasComment("项目文件 - 一般文件记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SecondReviewTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史文件"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("关联具体的文件记录,记录里面有大小,格式,名称"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrianingCount") + .HasColumnType("int"); + + b.Property("TrianingDate") + .HasColumnType("date"); + + b.Property("TrianingState") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("培训效果"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialTrianingRecord", t => + { + t.HasComment("项目文件 - 培训记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("这里实际是UserRoleId"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("FileContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FileEnContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileVersion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("UpdateDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserAgreementTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserAgreement", t => + { + t.HasComment("后台 - 用户协议和隐私采集"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsIgnoreUncommonly") + .HasColumnType("bit") + .HasComment("是否忽略异地登录"); + + b.Property("IsLoginUncommonly") + .HasColumnType("bit") + .HasComment("异地登录"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDoubleScreen") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsCopyLesionAnswer") + .HasColumnType("bit"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsViewStudyPart") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PMBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("退回原因"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("RandomOrder") + .HasColumnType("int") + .HasComment("完全随机阅片号"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.02 全局任务在截止访视号上+0.03 肿瘤0.06"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "MainAuditDocument") + .WithMany("AuditDocumentOldVersionList") + .HasForeignKey("MainFileId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("MainAuditDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocumentClosure", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "Ancestor") + .WithMany("DescendantList") + .HasForeignKey("AncestorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "Descendant") + .WithMany("AncestorList") + .HasForeignKey("DescendantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ancestor"); + + b.Navigation("Descendant"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditRecord", "AuditRecord") + .WithMany("AuditRecordIdentityUserList") + .HasForeignKey("AuditRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("AuditRecordList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuditRecord"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordPermission", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "AuditDocument") + .WithMany() + .HasForeignKey("AuditDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditRecord", "AuditRecord") + .WithMany() + .HasForeignKey("AuditRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuditDocument"); + + b.Navigation("AuditRecord"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ClinicalFormList") + .HasForeignKey("ReadingId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionKeyFileRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailAttachmentLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailLog", "EmailLog") + .WithMany("AttachmentList") + .HasForeignKey("EmailLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EmailLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailReSendLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailRecipientLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailLog", "EmailLog") + .WithMany("EmailRecipientLogList") + .HasForeignKey("EmailLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EmailLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("NoneDicomStudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "ImageMarkNoneDicomStudy") + .WithMany("ImageLabelNoneDicomFileList") + .HasForeignKey("ImageLabelNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ImageMarkNoneDicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingImportFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", null) + .WithMany("ReadingNoneDicomMarkList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", "ReadingNoneDicomMark") + .WithMany() + .HasForeignKey("NoneDicomMarkId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingNoneDicomMark"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany("OncologyResultList") + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "FristAddTask") + .WithMany() + .HasForeignKey("FristAddTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSeries") + .WithMany() + .HasForeignKey("SeriesId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSeries"); + + b.Navigation("FristAddTask"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionMarkList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisitImageBackRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectVisitImageBackRecordList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SysFileType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionKeyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocumentAttachmentList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithOne("TaskAllocationRule") + .HasForeignKey("IRaCIS.Core.Domain.Models.TaskAllocationRule", "EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.StudyName", "StudyNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("EnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("IsChoose") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("StudyNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("StudyNameList"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialAuditShow", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("KeyFileList") + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocumentAttachmentList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFileType", "TrialFileType") + .WithMany() + .HasForeignKey("TrialFileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialFileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "PDFFileRecord") + .WithMany() + .HasForeignKey("PDFFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "SignFileRecord") + .WithMany() + .HasForeignKey("SignFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "WordFileRecord") + .WithMany() + .HasForeignKey("WordFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("PDFFileRecord"); + + b.Navigation("SignFileRecord"); + + b.Navigation("WordFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialHistoryRecordFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFileType", "TrialFileType") + .WithMany() + .HasForeignKey("TrialFileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFinalRecord", "TrialFinalRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialNormalRecord", "TrialNormalRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialTrianingRecord", "TrialTrianingRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialFileType"); + + b.Navigation("TrialFinalRecord"); + + b.Navigation("TrialNormalRecord"); + + b.Navigation("TrialTrianingRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "TrialFileRecord") + .WithMany() + .HasForeignKey("TrialFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("TrialFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "TrialFileRecord") + .WithMany() + .HasForeignKey("TrialFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("TrialFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.Navigation("AncestorList"); + + b.Navigation("AuditDocumentOldVersionList"); + + b.Navigation("DescendantList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.Navigation("AuditRecordIdentityUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("InstanceList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("EmailRecipientLogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + + b.Navigation("TaskAllocationRule") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("AuditRecordList"); + + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("ImageLabelNoneDicomFileList"); + + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("KeyFileList"); + + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectVisitImageBackRecordList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("TrialQCQuestionAnswerList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + + b.Navigation("SystemDocumentAttachmentList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + + b.Navigation("TrialDocumentAttachmentList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("OncologyResultList"); + + b.Navigation("ReadingNoneDicomMarkList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("ReadingTaskQuestionMarkList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.cs new file mode 100644 index 000000000..4dbbaa902 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20260110112346_clusterModify.cs @@ -0,0 +1,10715 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class clusterModify : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_ReadingClinicalData_DicomStudy_StudyId", + table: "ReadingClinicalData"); + + migrationBuilder.DropForeignKey( + name: "FK_ReadingConsistentClinicalData_DicomStudy_StudyId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropForeignKey( + name: "FK_StudyMonitor_TaskStudy_StudyId", + table: "StudyMonitor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VolumeReward", + table: "VolumeReward"); + + migrationBuilder.DropIndex( + name: "IX_VolumeReward_CreateUserId", + table: "VolumeReward"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitTaskReReading", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_CreateUserId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_NewReReadingTaskId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_OriginalReReadingTaskId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_RequestReReadingConfirmUserId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_RequestReReadingUserId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_RootReReadingTaskId", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_TrialId", + table: "VisitTaskReReading"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitTask", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_CreateUserId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_DoctorUserId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_JudgeResultTaskId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_JudgeVisitTaskId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_SouceReadModuleId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_SourceSubjectVisitId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_SubjectId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_TrialId", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_TrialReadingCriterionId", + table: "VisitTask"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitStage", + table: "VisitStage"); + + migrationBuilder.DropIndex( + name: "IX_VisitStage_CreateUserId", + table: "VisitStage"); + + migrationBuilder.DropIndex( + name: "IX_VisitStage_TrialId", + table: "VisitStage"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitPlanInfluenceStudy", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStudy_CreateUserId", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStudy_SubjectVisitId", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStudy_VisitPlanInfluenceStatId", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitPlanInfluenceStat", + table: "VisitPlanInfluenceStat"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStat_CreateUserId", + table: "VisitPlanInfluenceStat"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VerificationCode", + table: "VerificationCode"); + + migrationBuilder.DropIndex( + name: "IX_VerificationCode_CreateUserId", + table: "VerificationCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Vacation", + table: "Vacation"); + + migrationBuilder.DropIndex( + name: "IX_Vacation_CreateUserId", + table: "Vacation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserWLTemplate", + table: "UserWLTemplate"); + + migrationBuilder.DropIndex( + name: "IX_UserWLTemplate_CreateUserId", + table: "UserWLTemplate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserTypeMenu", + table: "UserTypeMenu"); + + migrationBuilder.DropIndex( + name: "IX_UserTypeMenu_MenuId", + table: "UserTypeMenu"); + + migrationBuilder.DropIndex( + name: "IX_UserTypeMenu_UserTypeId", + table: "UserTypeMenu"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserTypeGroup", + table: "UserTypeGroup"); + + migrationBuilder.DropIndex( + name: "IX_UserTypeGroup_DictionaryId", + table: "UserTypeGroup"); + + migrationBuilder.DropIndex( + name: "IX_UserTypeGroup_UserTypeId", + table: "UserTypeGroup"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserType", + table: "UserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserPassWordLog", + table: "UserPassWordLog"); + + migrationBuilder.DropIndex( + name: "IX_UserPassWordLog_CreateUserId", + table: "UserPassWordLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserLog", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_ActionIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_CreateUserId", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_TargetIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserFeedBack", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_CreateUserId", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_SubjectId", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_SubjectVisitId", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_TrialId", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_TrialSiteId", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_VisitTaskId", + table: "UserFeedBack"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserAgreement", + table: "UserAgreement"); + + migrationBuilder.DropIndex( + name: "IX_UserAgreement_CreateUserId", + table: "UserAgreement"); + + migrationBuilder.DropPrimaryKey( + name: "PK_User", + table: "User"); + + migrationBuilder.DropIndex( + name: "IX_User_CreateUserId", + table: "User"); + + migrationBuilder.DropIndex( + name: "IX_User_DoctorId", + table: "User"); + + migrationBuilder.DropIndex( + name: "IX_User_IdentityUserId", + table: "User"); + + migrationBuilder.DropIndex( + name: "IX_User_UserTypeId", + table: "User"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1BM", + table: "TumorAssessment_RECIST1Point1BM"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1", + table: "TumorAssessment_RECIST1Point1"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_IRECIST1Point1", + table: "TumorAssessment_IRECIST1Point1"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialVirtualSiteCodeUpdate", + table: "TrialVirtualSiteCodeUpdate"); + + migrationBuilder.DropIndex( + name: "IX_TrialVirtualSiteCodeUpdate_CreateUserId", + table: "TrialVirtualSiteCodeUpdate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialUser", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_CreateUserId", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_TrialId", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_TrialUserId", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_UserId", + table: "TrialUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialTrianingRecord", + table: "TrialTrianingRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialTrianingRecord_CreateUserId", + table: "TrialTrianingRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialTrianingRecord_HistoryFileRecordId", + table: "TrialTrianingRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialTrianingRecord_TrialFileRecordId", + table: "TrialTrianingRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialStatus", + table: "TrialStatus"); + + migrationBuilder.DropIndex( + name: "IX_TrialStatus_CreateUserId", + table: "TrialStatus"); + + migrationBuilder.DropIndex( + name: "IX_TrialStatus_TrialId", + table: "TrialStatus"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialStateChange", + table: "TrialStateChange"); + + migrationBuilder.DropIndex( + name: "IX_TrialStateChange_CreateUserId", + table: "TrialStateChange"); + + migrationBuilder.DropIndex( + name: "IX_TrialStateChange_TrialId", + table: "TrialStateChange"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteUserSurvey", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUserSurvey_CreateUserId", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUserSurvey_TrialSiteSurveyId", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUserSurvey_UserTypeId", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteUser", + table: "TrialSiteUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUser_CreateUserId", + table: "TrialSiteUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUser_TrialId", + table: "TrialSiteUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUser_TrialSiteId", + table: "TrialSiteUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUser_UserId", + table: "TrialSiteUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteSurvey", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_CreateUserId", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_PreliminaryUserId", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_ReviewerUserId", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_TrialId", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_TrialSiteId", + table: "TrialSiteSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteEquipmentSurvey", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteEquipmentSurvey_CreateUserId", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteEquipmentSurvey_EquipmentTypeId", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteEquipmentSurvey_TrialSiteSurveyId", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteDicomAE", + table: "TrialSiteDicomAE"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteDicomAE_CreateUserId", + table: "TrialSiteDicomAE"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteDicomAE_TrialSiteId", + table: "TrialSiteDicomAE"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSite", + table: "TrialSite"); + + migrationBuilder.DropIndex( + name: "IX_TrialSite_CreateUserId", + table: "TrialSite"); + + migrationBuilder.DropIndex( + name: "IX_TrialSite_SiteId", + table: "TrialSite"); + + migrationBuilder.DropIndex( + name: "IX_TrialSite_TrialId", + table: "TrialSite"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSign", + table: "TrialSign"); + + migrationBuilder.DropIndex( + name: "IX_TrialSign_CreateUserId", + table: "TrialSign"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialRevenuesPriceVerification", + table: "TrialRevenuesPriceVerification"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialRevenuesPrice", + table: "TrialRevenuesPrice"); + + migrationBuilder.DropIndex( + name: "IX_TrialRevenuesPrice_CreateUserId", + table: "TrialRevenuesPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialQCQuestionAnswer", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestionAnswer_CreateUserId", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestionAnswer_SubjectVisitId", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestionAnswer_TrialQCQuestionConfigureId", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialQCQuestion", + table: "TrialQCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestion_CreateUserId", + table: "TrialQCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestion_ParentId", + table: "TrialQCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestion_TrialId", + table: "TrialQCQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialPaymentPrice", + table: "TrialPaymentPrice"); + + migrationBuilder.DropIndex( + name: "IX_TrialPaymentPrice_CreateUserId", + table: "TrialPaymentPrice"); + + migrationBuilder.DropIndex( + name: "IX_TrialPaymentPrice_TrialId", + table: "TrialPaymentPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialNormalRecord", + table: "TrialNormalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialNormalRecord_CreateUserId", + table: "TrialNormalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialNormalRecord_HistoryFileRecordId", + table: "TrialNormalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialNormalRecord_TrialFileRecordId", + table: "TrialNormalRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialImageDownload", + table: "TrialImageDownload"); + + migrationBuilder.DropIndex( + name: "IX_TrialImageDownload_CreateUserId", + table: "TrialImageDownload"); + + migrationBuilder.DropIndex( + name: "IX_TrialImageDownload_SubjectId", + table: "TrialImageDownload"); + + migrationBuilder.DropIndex( + name: "IX_TrialImageDownload_TrialId", + table: "TrialImageDownload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialIdentityUser", + table: "TrialIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialIdentityUser_CreateUserId", + table: "TrialIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialIdentityUser_IdentityUserId", + table: "TrialIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialIdentityUser_TrialId", + table: "TrialIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialHistoryRecordFile", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialHistoryRecordFile_CreateUserId", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialHistoryRecordFile_TrialFileTypeId", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialHistoryRecordFile_TrialRecordId", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFinalRecord", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_CreateUserId", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_HistoryFileRecordId", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_PDFFileRecordId", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_SignFileRecordId", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_WordFileRecordId", + table: "TrialFinalRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFileType", + table: "TrialFileType"); + + migrationBuilder.DropIndex( + name: "IX_TrialFileType_CreateUserId", + table: "TrialFileType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFile", + table: "TrialFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialFile_CreateUserId", + table: "TrialFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialFile_TrialFileTypeId", + table: "TrialFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExternalUser", + table: "TrialExternalUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialExternalUser_CreateUserId", + table: "TrialExternalUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialExternalUser_TrialId", + table: "TrialExternalUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExperienceCriteria", + table: "TrialExperienceCriteria"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperienceCriteria_DoctorId", + table: "TrialExperienceCriteria"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperienceCriteria_EvaluationCriteriaId", + table: "TrialExperienceCriteria"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperienceCriteria_TrialExperienceId", + table: "TrialExperienceCriteria"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExperience", + table: "TrialExperience"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperience_CreateUserId", + table: "TrialExperience"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperience_PhaseId", + table: "TrialExperience"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperience_TrialId", + table: "TrialExperience"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailNoticeUser", + table: "TrialEmailNoticeUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeUser_TrialEmailNoticeConfigId", + table: "TrialEmailNoticeUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailNoticeConfig", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeConfig_CreateUserId", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeConfig_SysEmailNoticeConfigId", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeConfig_TrialId", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeConfig_TrialReadingCriterionId", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailBlackUser", + table: "TrialEmailBlackUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailBlackUser_TrialEmailNoticeConfigId", + table: "TrialEmailBlackUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailBlackUser_UserId", + table: "TrialEmailBlackUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocumentAttachment", + table: "TrialDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocumentAttachment_CreateUserId", + table: "TrialDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocumentAttachment_TrialDocumentId", + table: "TrialDocumentAttachment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocument", + table: "TrialDocument"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocument_CreateUserId", + table: "TrialDocument"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocument_FileTypeId", + table: "TrialDocument"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocument_TrialId", + table: "TrialDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocNeedConfirmedUserType", + table: "TrialDocNeedConfirmedUserType"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocNeedConfirmedUserType_NeedConfirmUserTypeId", + table: "TrialDocNeedConfirmedUserType"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocNeedConfirmedUserType_TrialDocumentId", + table: "TrialDocNeedConfirmedUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocConfirmedIdentityUser", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocConfirmedIdentityUser_ConfirmUserId", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocConfirmedIdentityUser_CreateUserId", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocConfirmedIdentityUser_TrialDocumentId", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDictionary", + table: "TrialDictionary"); + + migrationBuilder.DropIndex( + name: "IX_TrialDictionary_DictionaryId", + table: "TrialDictionary"); + + migrationBuilder.DropIndex( + name: "IX_TrialDictionary_TrialId", + table: "TrialDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDicomAE", + table: "TrialDicomAE"); + + migrationBuilder.DropIndex( + name: "IX_TrialDicomAE_CreateUserId", + table: "TrialDicomAE"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionKeyFile", + table: "TrialCriterionKeyFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionKeyFile_CreateUserId", + table: "TrialCriterionKeyFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionKeyFile_TrialCriterionId", + table: "TrialCriterionKeyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionDictionaryCode", + table: "TrialCriterionDictionaryCode"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionDictionaryCode_CreateUserId", + table: "TrialCriterionDictionaryCode"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionDictionaryCode_TrialCriterionId", + table: "TrialCriterionDictionaryCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionAdditionalAssessmentType", + table: "TrialCriterionAdditionalAssessmentType"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_CreateUserId", + table: "TrialCriterionAdditionalAssessmentType"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_TrialReadingCriterionId", + table: "TrialCriterionAdditionalAssessmentType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalTableQuestion", + table: "TrialClinicalTableQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalTableQuestion_CreateUserId", + table: "TrialClinicalTableQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalQuestion", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalQuestion_CreateUserId", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalQuestion_GroupId", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalQuestion_TrialClinicalId", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalDataSetCriterion", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalDataSetCriterion_CreateUserId", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalDataSetCriterion_TrialClinicalDataSetId", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalDataSetCriterion_TrialReadingCriterionId", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialBodyPart", + table: "TrialBodyPart"); + + migrationBuilder.DropIndex( + name: "IX_TrialBodyPart_CreateUserId", + table: "TrialBodyPart"); + + migrationBuilder.DropIndex( + name: "IX_TrialBodyPart_TrialId", + table: "TrialBodyPart"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialAuditShow", + table: "TrialAuditShow"); + + migrationBuilder.DropIndex( + name: "IX_TrialAuditShow_CreateUserId", + table: "TrialAuditShow"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Trial", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_CreateUserId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_CROId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_IndicationTypeId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_PhaseId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_QCQuestionConfirmedUserId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_ReviewModeId", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_SponsorId", + table: "Trial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TestLength", + table: "TestLength"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_TaskStudy_Id", + table: "TaskStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskStudy", + table: "TaskStudy"); + + migrationBuilder.DropIndex( + name: "IX_TaskStudy_CreateUserId", + table: "TaskStudy"); + + migrationBuilder.DropIndex( + name: "IX_TaskStudy_SubjectId", + table: "TaskStudy"); + + migrationBuilder.DropIndex( + name: "IX_TaskStudy_SubjectVisitId", + table: "TaskStudy"); + + migrationBuilder.DropIndex( + name: "IX_TaskStudy_VisitTaskId", + table: "TaskStudy"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_TaskSeries_Id", + table: "TaskSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskSeries", + table: "TaskSeries"); + + migrationBuilder.DropIndex( + name: "IX_TaskSeries_CreateUserId", + table: "TaskSeries"); + + migrationBuilder.DropIndex( + name: "IX_TaskSeries_StudyId", + table: "TaskSeries"); + + migrationBuilder.DropIndex( + name: "IX_TaskSeries_SubjectVisitId", + table: "TaskSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskMedicalReviewRule", + table: "TaskMedicalReviewRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReviewRule_CreateUserId", + table: "TaskMedicalReviewRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReviewRule_DoctorUserId", + table: "TaskMedicalReviewRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskMedicalReview", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_CreateUserId", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_LatestReplyUserId", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_MedicalManagerUserId", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_TrialId", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_VisitTaskId", + table: "TaskMedicalReview"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskInstance", + table: "TaskInstance"); + + migrationBuilder.DropIndex( + name: "IX_TaskInstance_CreateUserId", + table: "TaskInstance"); + + migrationBuilder.DropIndex( + name: "IX_TaskInstance_SeriesId", + table: "TaskInstance"); + + migrationBuilder.DropIndex( + name: "IX_TaskInstance_StudyId", + table: "TaskInstance"); + + migrationBuilder.DropIndex( + name: "IX_TaskInstance_SubjectVisitId", + table: "TaskInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskInfluence", + table: "TaskInfluence"); + + migrationBuilder.DropIndex( + name: "IX_TaskInfluence_CreateUserId", + table: "TaskInfluence"); + + migrationBuilder.DropIndex( + name: "IX_TaskInfluence_InfluenceTaskId", + table: "TaskInfluence"); + + migrationBuilder.DropIndex( + name: "IX_TaskInfluence_OriginalTaskId", + table: "TaskInfluence"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskConsistentRule", + table: "TaskConsistentRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskConsistentRule_CreateUserId", + table: "TaskConsistentRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskConsistentRule_TrialId", + table: "TaskConsistentRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskConsistentRule_TrialReadingCriterionId", + table: "TaskConsistentRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskAllocationRule", + table: "TaskAllocationRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskAllocationRule_CreateUserId", + table: "TaskAllocationRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskAllocationRule_DoctorUserId", + table: "TaskAllocationRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskAllocationRule_EnrollId", + table: "TaskAllocationRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskAllocationRule_TrialId", + table: "TaskAllocationRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNoticeUserType", + table: "SystemNoticeUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserType_CreateUserId", + table: "SystemNoticeUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserType_SystemNoticeId", + table: "SystemNoticeUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserType_UserTypeId", + table: "SystemNoticeUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNoticeUserRead", + table: "SystemNoticeUserRead"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserRead_CreateUserId", + table: "SystemNoticeUserRead"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserRead_SystemNoticeId", + table: "SystemNoticeUserRead"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNotice", + table: "SystemNotice"); + + migrationBuilder.DropIndex( + name: "IX_SystemNotice_CreateUserId", + table: "SystemNotice"); + + migrationBuilder.DropIndex( + name: "IX_SystemNotice_PublishedUserId", + table: "SystemNotice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocumentAttachment", + table: "SystemDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocumentAttachment_CreateUserId", + table: "SystemDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocumentAttachment_SystemDocumentId", + table: "SystemDocumentAttachment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocument", + table: "SystemDocument"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocument_CreateUserId", + table: "SystemDocument"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocument_FileTypeId", + table: "SystemDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocNeedConfirmedUserType", + table: "SystemDocNeedConfirmedUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocNeedConfirmedUserType_NeedConfirmUserTypeId", + table: "SystemDocNeedConfirmedUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocNeedConfirmedUserType_SystemDocumentId", + table: "SystemDocNeedConfirmedUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocConfirmedIdentityUser", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocConfirmedIdentityUser_ConfirmUserId", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocConfirmedIdentityUser_CreateUserId", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocConfirmedIdentityUser_SystemDocumentId", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemCriterionKeyFile", + table: "SystemCriterionKeyFile"); + + migrationBuilder.DropIndex( + name: "IX_SystemCriterionKeyFile_CreateUserId", + table: "SystemCriterionKeyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemCriterionDictionaryCode", + table: "SystemCriterionDictionaryCode"); + + migrationBuilder.DropIndex( + name: "IX_SystemCriterionDictionaryCode_CreateUserId", + table: "SystemCriterionDictionaryCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemClinicalTableQuestion", + table: "SystemClinicalTableQuestion"); + + migrationBuilder.DropIndex( + name: "IX_SystemClinicalTableQuestion_CreateUserId", + table: "SystemClinicalTableQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemClinicalQuestion", + table: "SystemClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_SystemClinicalQuestion_CreateUserId", + table: "SystemClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_SystemClinicalQuestion_GroupId", + table: "SystemClinicalQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemBasicData", + table: "SystemBasicData"); + + migrationBuilder.DropIndex( + name: "IX_SystemBasicData_CreateUserId", + table: "SystemBasicData"); + + migrationBuilder.DropIndex( + name: "IX_SystemBasicData_ParentId", + table: "SystemBasicData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemAnonymization", + table: "SystemAnonymization"); + + migrationBuilder.DropIndex( + name: "IX_SystemAnonymization_CreateUserId", + table: "SystemAnonymization"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SysFileType", + table: "SysFileType"); + + migrationBuilder.DropIndex( + name: "IX_SysFileType_CreateUserId", + table: "SysFileType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectVisitImageBackRecord", + table: "SubjectVisitImageBackRecord"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisitImageBackRecord_CreateUserId", + table: "SubjectVisitImageBackRecord"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisitImageBackRecord_SubjectVisitId", + table: "SubjectVisitImageBackRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectVisit", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_CreateUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_CurrentActionUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_ForwardUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_OutPlanPreviousVisitId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_PreliminaryAuditUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_ReviewAuditUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_SubjectId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_SubmitUserId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_TrialId", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_TrialSiteId", + table: "SubjectVisit"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectUser", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_CreateUserId", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_DoctorUserId", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_ReplacedSubjectUserId", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_SubjectId", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_TrialId", + table: "SubjectUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitStudyFilter", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_CreateUserId", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_SeriesId", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_StudyId", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_SubjectVisitId", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitFilter", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_CreateUserId", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_SubjectId", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_SubjectVisitId", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluation", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluation_CreateUserId", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluation_SubjectId", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluation_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCanceDoctor", + table: "SubjectCanceDoctor"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCanceDoctor_CreateUserId", + table: "SubjectCanceDoctor"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCanceDoctor_SubjectId", + table: "SubjectCanceDoctor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectAdditionalEvaluationResult", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropIndex( + name: "IX_SubjectAdditionalEvaluationResult_CreateUserId", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropIndex( + name: "IX_SubjectAdditionalEvaluationResult_SubjectId", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropIndex( + name: "IX_SubjectAdditionalEvaluationResult_TrialReadingQuestionId", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Subject", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_CreateUserId", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_FinalSubjectVisitId", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_LatestSubjectVisitId", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_TrialId", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_TrialSiteId", + table: "Subject"); + + migrationBuilder.DropPrimaryKey( + name: "PK_StudyMonitor", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_CreateUserId", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_StudyId", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_SubjectId", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_SubjectVisitId", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_TrialId", + table: "StudyMonitor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Sponsor", + table: "Sponsor"); + + migrationBuilder.DropIndex( + name: "IX_Sponsor_CreateUserId", + table: "Sponsor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Site", + table: "Site"); + + migrationBuilder.DropIndex( + name: "IX_Site_CreateUserId", + table: "Site"); + + migrationBuilder.DropIndex( + name: "IX_Site_HospitalId", + table: "Site"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ShortcutKey", + table: "ShortcutKey"); + + migrationBuilder.DropIndex( + name: "IX_ShortcutKey_CreateUserId", + table: "ShortcutKey"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_SCPStudy_Id", + table: "SCPStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPStudy", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_CreateUserId", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_PatientId", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_SubjectVisitId", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_TrialId", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_TrialSiteId", + table: "SCPStudy"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_SCPSeries_Id", + table: "SCPSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPSeries", + table: "SCPSeries"); + + migrationBuilder.DropIndex( + name: "IX_SCPSeries_CreateUserId", + table: "SCPSeries"); + + migrationBuilder.DropIndex( + name: "IX_SCPSeries_StudyId", + table: "SCPSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPPatient", + table: "SCPPatient"); + + migrationBuilder.DropIndex( + name: "IX_SCPPatient_CreateUserId", + table: "SCPPatient"); + + migrationBuilder.DropIndex( + name: "IX_SCPPatient_SubjectId", + table: "SCPPatient"); + + migrationBuilder.DropIndex( + name: "IX_SCPPatient_TrialId", + table: "SCPPatient"); + + migrationBuilder.DropIndex( + name: "IX_SCPPatient_TrialSiteId", + table: "SCPPatient"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPInstance", + table: "SCPInstance"); + + migrationBuilder.DropIndex( + name: "IX_SCPInstance_CreateUserId", + table: "SCPInstance"); + + migrationBuilder.DropIndex( + name: "IX_SCPInstance_SeriesId", + table: "SCPInstance"); + + migrationBuilder.DropIndex( + name: "IX_SCPInstance_StudyId", + table: "SCPInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPImageUpload", + table: "SCPImageUpload"); + + migrationBuilder.DropIndex( + name: "IX_SCPImageUpload_CreateUserId", + table: "SCPImageUpload"); + + migrationBuilder.DropIndex( + name: "IX_SCPImageUpload_TrialId", + table: "SCPImageUpload"); + + migrationBuilder.DropIndex( + name: "IX_SCPImageUpload_TrialSiteId", + table: "SCPImageUpload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ResearchPublication", + table: "ResearchPublication"); + + migrationBuilder.DropIndex( + name: "IX_ResearchPublication_CreateUserId", + table: "ResearchPublication"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadModuleCriterionFrom", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropIndex( + name: "IX_ReadModuleCriterionFrom_ClinicalFormId", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropIndex( + name: "IX_ReadModuleCriterionFrom_CreateUserId", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropIndex( + name: "IX_ReadModuleCriterionFrom_ReadModuleId", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadModule", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_CreateUserId", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_ReadingPeriodSetId", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_SubjectId", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_SubjectVisitId", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_TrialId", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_TrialReadingCriterionId", + table: "ReadModule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTrialCriterionDictionary", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTrialCriterionDictionary_CreateUserId", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTrialCriterionDictionary_CriterionId", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTrialCriterionDictionary_DictionaryId", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskRelation", + table: "ReadingTaskRelation"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskRelation_CreateUserId", + table: "ReadingTaskRelation"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskRelation_TaskId", + table: "ReadingTaskRelation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskQuestionMark", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionMark_CreateUserId", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionMark_QuestionId", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionMark_VisitTaskId", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskQuestionAnswer", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionAnswer_CreateUserId", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionAnswer_ReadingQuestionTrialId", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionAnswer_SubjectId", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionAnswer_VisitTaskId", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionTrial", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionTrial_CreateUserId", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionTrial_DependParentId", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionTrial_ReadingQuestionId", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionSystem", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionSystem_CreateUserId", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionSystem_DependParentId", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionSystem_ReadingQuestionId", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionAnswer", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_CreateUserId", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_QuestionId", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_RowId", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_TableQuestionId", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_VisitTaskId", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableAnswerRowInfo", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_CreateUserId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_FristAddTaskId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_InstanceId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_MergeRowId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_OrganInfoId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_QuestionId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_SeriesId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_SplitRowId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_StudyId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_VisitTaskId", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingSystemCriterionDictionary", + table: "ReadingSystemCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingSystemCriterionDictionary_CreateUserId", + table: "ReadingSystemCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingSystemCriterionDictionary_DictionaryId", + table: "ReadingSystemCriterionDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionTrial", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_CreateUserId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_GroupId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_ParentId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_ReadingCriterionPageId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_ReadingQuestionCriterionTrialId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_RelevanceId", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionSystem", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_CreateUserId", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_GroupId", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_ParentId", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_ReadingQuestionCriterionSystemId", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_RelevanceId", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionCriterionTrial", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionCriterionTrial_CreateUserId", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionCriterionTrial_TrialId", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionCriterionSystem", + table: "ReadingQuestionCriterionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionCriterionSystem_CreateUserId", + table: "ReadingQuestionCriterionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodSite", + table: "ReadingPeriodSite"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSite_CreateUserId", + table: "ReadingPeriodSite"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSite_ReadingPeriodSetId", + table: "ReadingPeriodSite"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSite_TrialSiteId", + table: "ReadingPeriodSite"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodSet", + table: "ReadingPeriodSet"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSet_CreateUserId", + table: "ReadingPeriodSet"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSet_VisitStageId", + table: "ReadingPeriodSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodPlan", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodPlan_CreateUserId", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodPlan_ReadingPeriodSetId", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodPlan_SubjectVisitId", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingOncologyTaskInfo", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingOncologyTaskInfo_CreateUserId", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingOncologyTaskInfo_OncologyTaskId", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingOncologyTaskInfo_VisitTaskId", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingNoneDicomMarkBinding", + table: "ReadingNoneDicomMarkBinding"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMarkBinding_CreateUserId", + table: "ReadingNoneDicomMarkBinding"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMarkBinding_NoneDicomMarkId", + table: "ReadingNoneDicomMarkBinding"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingNoneDicomMark", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMark_CreateUserId", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMark_StudyId", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMark_VisitTaskId", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineTrialQuestion", + table: "ReadingMedicineTrialQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineTrialQuestion_CreateUserId", + table: "ReadingMedicineTrialQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineTrialQuestion_ParentId", + table: "ReadingMedicineTrialQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineSystemQuestion", + table: "ReadingMedicineSystemQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineSystemQuestion_CreateUserId", + table: "ReadingMedicineSystemQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineSystemQuestion_ParentId", + table: "ReadingMedicineSystemQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineQuestionAnswer", + table: "ReadingMedicineQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineQuestionAnswer_CreateUserId", + table: "ReadingMedicineQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineQuestionAnswer_TaskMedicalReviewId", + table: "ReadingMedicineQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicalReviewDialog", + table: "ReadingMedicalReviewDialog"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicalReviewDialog_CreateUserId", + table: "ReadingMedicalReviewDialog"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicalReviewDialog_TaskMedicalReviewId", + table: "ReadingMedicalReviewDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingJudgeInfo", + table: "ReadingJudgeInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingJudgeInfo_CreateUserId", + table: "ReadingJudgeInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingImportFile", + table: "ReadingImportFile"); + + migrationBuilder.DropIndex( + name: "IX_ReadingImportFile_CreateUserId", + table: "ReadingImportFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingGlobalTaskInfo", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingGlobalTaskInfo_CreateUserId", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingGlobalTaskInfo_GlobalTaskId", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingGlobalTaskInfo_QuestionId", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingGlobalTaskInfo_TaskId", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingCustomTag", + table: "ReadingCustomTag"); + + migrationBuilder.DropIndex( + name: "IX_ReadingCustomTag_CreateUserId", + table: "ReadingCustomTag"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingCriterionPage", + table: "ReadingCriterionPage"); + + migrationBuilder.DropIndex( + name: "IX_ReadingCriterionPage_CreateUserId", + table: "ReadingCriterionPage"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingConsistentClinicalDataPDF", + table: "ReadingConsistentClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalDataPDF_CreateUserId", + table: "ReadingConsistentClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalDataPDF_ReadingConsistentClinicalDataId", + table: "ReadingConsistentClinicalDataPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingConsistentClinicalData", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_ClinicalDataTrialSetId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_CreateUserId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_ReadingId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_StudyId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_SubjectId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_TrialId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingClinicalDataPDF", + table: "ReadingClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalDataPDF_CreateUserId", + table: "ReadingClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalDataPDF_ReadingClinicalDataId", + table: "ReadingClinicalDataPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingClinicalData", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_ClinicalDataTrialSetId", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_CreateUserId", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_ReadingId", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_StudyId", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_SubjectId", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_TrialId", + table: "ReadingClinicalData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RankPrice", + table: "RankPrice"); + + migrationBuilder.DropIndex( + name: "IX_RankPrice_CreateUserId", + table: "RankPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCQuestion", + table: "QCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_QCQuestion_CreateUserId", + table: "QCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_QCQuestion_ParentId", + table: "QCQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCChallengeDialog", + table: "QCChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_QCChallengeDialog_CreateUserId", + table: "QCChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_QCChallengeDialog_QCChallengeId", + table: "QCChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_QCChallengeDialog_SubjectVisitId", + table: "QCChallengeDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCChallenge", + table: "QCChallenge"); + + migrationBuilder.DropIndex( + name: "IX_QCChallenge_CreateUserId", + table: "QCChallenge"); + + migrationBuilder.DropIndex( + name: "IX_QCChallenge_LatestReplyUserId", + table: "QCChallenge"); + + migrationBuilder.DropIndex( + name: "IX_QCChallenge_SubjectVisitId", + table: "QCChallenge"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PublishLog", + table: "PublishLog"); + + migrationBuilder.DropIndex( + name: "IX_PublishLog_CreateUserId", + table: "PublishLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousSurgery", + table: "PreviousSurgery"); + + migrationBuilder.DropIndex( + name: "IX_PreviousSurgery_ClinicalDataTrialSetId", + table: "PreviousSurgery"); + + migrationBuilder.DropIndex( + name: "IX_PreviousSurgery_CreateUserId", + table: "PreviousSurgery"); + + migrationBuilder.DropIndex( + name: "IX_PreviousSurgery_SubjectVisitId", + table: "PreviousSurgery"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousPDF", + table: "PreviousPDF"); + + migrationBuilder.DropIndex( + name: "IX_PreviousPDF_CreateUserId", + table: "PreviousPDF"); + + migrationBuilder.DropIndex( + name: "IX_PreviousPDF_SubjectVisitId", + table: "PreviousPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousOther", + table: "PreviousOther"); + + migrationBuilder.DropIndex( + name: "IX_PreviousOther_ClinicalDataTrialSetId", + table: "PreviousOther"); + + migrationBuilder.DropIndex( + name: "IX_PreviousOther_CreateUserId", + table: "PreviousOther"); + + migrationBuilder.DropIndex( + name: "IX_PreviousOther_SubjectVisitId", + table: "PreviousOther"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousHistory", + table: "PreviousHistory"); + + migrationBuilder.DropIndex( + name: "IX_PreviousHistory_ClinicalDataTrialSetId", + table: "PreviousHistory"); + + migrationBuilder.DropIndex( + name: "IX_PreviousHistory_CreateUserId", + table: "PreviousHistory"); + + migrationBuilder.DropIndex( + name: "IX_PreviousHistory_SubjectVisitId", + table: "PreviousHistory"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Postgraduate", + table: "Postgraduate"); + + migrationBuilder.DropIndex( + name: "IX_Postgraduate_CreateUserId", + table: "Postgraduate"); + + migrationBuilder.DropIndex( + name: "IX_Postgraduate_HospitalId", + table: "Postgraduate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PaymentDetail", + table: "PaymentDetail"); + + migrationBuilder.DropIndex( + name: "IX_PaymentDetail_CreateUserId", + table: "PaymentDetail"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PaymentAdjustment", + table: "PaymentAdjustment"); + + migrationBuilder.DropIndex( + name: "IX_PaymentAdjustment_CreateUserId", + table: "PaymentAdjustment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Payment", + table: "Payment"); + + migrationBuilder.DropIndex( + name: "IX_Payment_CreateUserId", + table: "Payment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_OrganTrialInfo", + table: "OrganTrialInfo"); + + migrationBuilder.DropIndex( + name: "IX_OrganTrialInfo_CreateUserId", + table: "OrganTrialInfo"); + + migrationBuilder.DropIndex( + name: "IX_OrganTrialInfo_OrganInfoId", + table: "OrganTrialInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_OrganInfo", + table: "OrganInfo"); + + migrationBuilder.DropIndex( + name: "IX_OrganInfo_CreateUserId", + table: "OrganInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_NoneDicomStudyFile", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_CreateUserId", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_NoneDicomStudyId", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_OriginNoneDicomStudyId", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_VisitTaskId", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_NoneDicomStudy", + table: "NoneDicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudy_CreateUserId", + table: "NoneDicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudy_SubjectId", + table: "NoneDicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudy_SubjectVisitId", + table: "NoneDicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudy_TrialId", + table: "NoneDicomStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Menu", + table: "Menu"); + + migrationBuilder.DropIndex( + name: "IX_Menu_CreateUserId", + table: "Menu"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Internationalization", + table: "Internationalization"); + + migrationBuilder.DropIndex( + name: "IX_Internationalization_CreateUserId", + table: "Internationalization"); + + migrationBuilder.DropIndex( + name: "IX_Internationalization_PublishLogId", + table: "Internationalization"); + + migrationBuilder.DropPrimaryKey( + name: "PK_InspectionFile", + table: "InspectionFile"); + + migrationBuilder.DropIndex( + name: "IX_InspectionFile_CreateUserId", + table: "InspectionFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ImageShare", + table: "ImageShare"); + + migrationBuilder.DropPrimaryKey( + name: "PK_IdentityUser", + table: "IdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_IdentityUser_CreateUserId", + table: "IdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_IdentityUser_TrialId", + table: "IdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Hospital", + table: "Hospital"); + + migrationBuilder.DropIndex( + name: "IX_Hospital_CreateUserId", + table: "Hospital"); + + migrationBuilder.DropIndex( + name: "IX_Hospital_SiteId", + table: "Hospital"); + + migrationBuilder.DropPrimaryKey( + name: "PK_FrontAuditConfig", + table: "FrontAuditConfig"); + + migrationBuilder.DropIndex( + name: "IX_FrontAuditConfig_CreateUserId", + table: "FrontAuditConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExploreRecommend", + table: "ExploreRecommend"); + + migrationBuilder.DropIndex( + name: "IX_ExploreRecommend_CreateUserId", + table: "ExploreRecommend"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExchangeRate", + table: "ExchangeRate"); + + migrationBuilder.DropIndex( + name: "IX_ExchangeRate_CreateUserId", + table: "ExchangeRate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EventStoreRecord", + table: "EventStoreRecord"); + + migrationBuilder.DropIndex( + name: "IX_EventStoreRecord_CreateUserId", + table: "EventStoreRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollReadingCriterion", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCriterion_CreateUserId", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCriterion_EnrollId", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCriterion_TrialReadingCriterionId", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollReadingCategory", + table: "EnrollReadingCategory"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCategory_CreateUserId", + table: "EnrollReadingCategory"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCategory_EnrollId", + table: "EnrollReadingCategory"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCategory_TrialReadingCriterionId", + table: "EnrollReadingCategory"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollDetail", + table: "EnrollDetail"); + + migrationBuilder.DropIndex( + name: "IX_EnrollDetail_CreateUserId", + table: "EnrollDetail"); + + migrationBuilder.DropIndex( + name: "IX_EnrollDetail_DoctorId", + table: "EnrollDetail"); + + migrationBuilder.DropIndex( + name: "IX_EnrollDetail_TrialDetailId", + table: "EnrollDetail"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Enroll", + table: "Enroll"); + + migrationBuilder.DropIndex( + name: "IX_Enroll_CreateUserId", + table: "Enroll"); + + migrationBuilder.DropIndex( + name: "IX_Enroll_DoctorId", + table: "Enroll"); + + migrationBuilder.DropIndex( + name: "IX_Enroll_DoctorUserId", + table: "Enroll"); + + migrationBuilder.DropIndex( + name: "IX_Enroll_TrialId", + table: "Enroll"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailReSendLog", + table: "EmailReSendLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailReSendLog_CreateUserId", + table: "EmailReSendLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailRecipientLog", + table: "EmailRecipientLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailRecipientLog_CreateUserId", + table: "EmailRecipientLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailRecipientLog_EmailLogId", + table: "EmailRecipientLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailNoticeUserType", + table: "EmailNoticeUserType"); + + migrationBuilder.DropIndex( + name: "IX_EmailNoticeUserType_EmailNoticeConfigId", + table: "EmailNoticeUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailNoticeConfig", + table: "EmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_EmailNoticeConfig_CreateUserId", + table: "EmailNoticeConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailLog", + table: "EmailLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailLog_CreateUserId", + table: "EmailLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailAttachmentLog", + table: "EmailAttachmentLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailAttachmentLog_CreateUserId", + table: "EmailAttachmentLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailAttachmentLog_EmailLogId", + table: "EmailAttachmentLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Education", + table: "Education"); + + migrationBuilder.DropIndex( + name: "IX_Education_CreateUserId", + table: "Education"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorWorkload", + table: "DoctorWorkload"); + + migrationBuilder.DropIndex( + name: "IX_DoctorWorkload_CreateUserId", + table: "DoctorWorkload"); + + migrationBuilder.DropIndex( + name: "IX_DoctorWorkload_TrialId", + table: "DoctorWorkload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorSummarize", + table: "DoctorSummarize"); + + migrationBuilder.DropIndex( + name: "IX_DoctorSummarize_CreateUserId", + table: "DoctorSummarize"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorPayInformation", + table: "DoctorPayInformation"); + + migrationBuilder.DropIndex( + name: "IX_DoctorPayInformation_CreateUserId", + table: "DoctorPayInformation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorDictionary", + table: "DoctorDictionary"); + + migrationBuilder.DropIndex( + name: "IX_DoctorDictionary_DictionaryId", + table: "DoctorDictionary"); + + migrationBuilder.DropIndex( + name: "IX_DoctorDictionary_DoctorId", + table: "DoctorDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorCriterionFile", + table: "DoctorCriterionFile"); + + migrationBuilder.DropIndex( + name: "IX_DoctorCriterionFile_CreateUserId", + table: "DoctorCriterionFile"); + + migrationBuilder.DropIndex( + name: "IX_DoctorCriterionFile_DoctorId", + table: "DoctorCriterionFile"); + + migrationBuilder.DropIndex( + name: "IX_DoctorCriterionFile_TrialReadingCriterionId", + table: "DoctorCriterionFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Doctor", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_CreateUserId", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_DepartmentId", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_HospitalId", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_PositionId", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_RankId", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_SpecialityId", + table: "Doctor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Dictionary", + table: "Dictionary"); + + migrationBuilder.DropIndex( + name: "IX_Dictionary_ConfigTypeId", + table: "Dictionary"); + + migrationBuilder.DropIndex( + name: "IX_Dictionary_CreateUserId", + table: "Dictionary"); + + migrationBuilder.DropIndex( + name: "IX_Dictionary_ParentId", + table: "Dictionary"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_DicomStudy_Id", + table: "DicomStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomStudy", + table: "DicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_DicomStudy_CreateUserId", + table: "DicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_DicomStudy_SubjectId", + table: "DicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_DicomStudy_SubjectVisitId", + table: "DicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_DicomStudy_TrialId", + table: "DicomStudy"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_DicomSeries_Id", + table: "DicomSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomSeries", + table: "DicomSeries"); + + migrationBuilder.DropIndex( + name: "IX_DicomSeries_CreateUserId", + table: "DicomSeries"); + + migrationBuilder.DropIndex( + name: "IX_DicomSeries_StudyId", + table: "DicomSeries"); + + migrationBuilder.DropIndex( + name: "IX_DicomSeries_SubjectVisitId", + table: "DicomSeries"); + + migrationBuilder.DropUniqueConstraint( + name: "AK_DicomInstance_Id", + table: "DicomInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomInstance", + table: "DicomInstance"); + + migrationBuilder.DropIndex( + name: "IX_DicomInstance_CreateUserId", + table: "DicomInstance"); + + migrationBuilder.DropIndex( + name: "IX_DicomInstance_SeriesId", + table: "DicomInstance"); + + migrationBuilder.DropIndex( + name: "IX_DicomInstance_StudyId", + table: "DicomInstance"); + + migrationBuilder.DropIndex( + name: "IX_DicomInstance_TrialId", + table: "DicomInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DataInspection", + table: "DataInspection"); + + migrationBuilder.DropIndex( + name: "IX_DataInspection_CreateUserId", + table: "DataInspection"); + + migrationBuilder.DropIndex( + name: "IX_DataInspection_TrialReadingCriterionId", + table: "DataInspection"); + + migrationBuilder.DropIndex( + name: "IX_DataInspection_VisitTaskId", + table: "DataInspection"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CROCompany", + table: "CROCompany"); + + migrationBuilder.DropIndex( + name: "IX_CROCompany_CreateUserId", + table: "CROCompany"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionNidusTrial", + table: "CriterionNidusTrial"); + + migrationBuilder.DropIndex( + name: "IX_CriterionNidusTrial_CreateUserId", + table: "CriterionNidusTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionNidusSystem", + table: "CriterionNidusSystem"); + + migrationBuilder.DropIndex( + name: "IX_CriterionNidusSystem_CreateUserId", + table: "CriterionNidusSystem"); + + migrationBuilder.DropIndex( + name: "IX_CriterionNidusSystem_CriterionId", + table: "CriterionNidusSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionKeyFileRead", + table: "CriterionKeyFileRead"); + + migrationBuilder.DropIndex( + name: "IX_CriterionKeyFileRead_CreateUserId", + table: "CriterionKeyFileRead"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CommonDocument", + table: "CommonDocument"); + + migrationBuilder.DropIndex( + name: "IX_CommonDocument_CreateUserId", + table: "CommonDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalTableAnswer", + table: "ClinicalTableAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalTableAnswer_CreateUserId", + table: "ClinicalTableAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalTableAnswer_RowId", + table: "ClinicalTableAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalQuestionAnswer", + table: "ClinicalQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalQuestionAnswer_ClinicalFormId", + table: "ClinicalQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalQuestionAnswer_CreateUserId", + table: "ClinicalQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalForm", + table: "ClinicalForm"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalForm_ClinicalDataTrialSetId", + table: "ClinicalForm"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalForm_CreateUserId", + table: "ClinicalForm"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalForm_ReadingId", + table: "ClinicalForm"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalForm_SubjectId", + table: "ClinicalForm"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalDataTrialSet", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataTrialSet_CreateUserId", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataTrialSet_SystemClinicalDataSetId", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataTrialSet_TrialId", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalDataSystemSet", + table: "ClinicalDataSystemSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataSystemSet_CreateUserId", + table: "ClinicalDataSystemSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalAnswerRowInfo", + table: "ClinicalAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalAnswerRowInfo_CreateUserId", + table: "ClinicalAnswerRowInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CheckChallengeDialog", + table: "CheckChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_CheckChallengeDialog_CreateUserId", + table: "CheckChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_CheckChallengeDialog_SubjectVisitId", + table: "CheckChallengeDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecordPermission", + table: "AuditRecordPermission"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordPermission_AuditDocumentId", + table: "AuditRecordPermission"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordPermission_AuditRecordId", + table: "AuditRecordPermission"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordPermission_CreateUserId", + table: "AuditRecordPermission"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecordIdentityUser", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordIdentityUser_AuditRecordId", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordIdentityUser_CreateUserId", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordIdentityUser_IdentityUserId", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecord", + table: "AuditRecord"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecord_CreateUserId", + table: "AuditRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditDocumentClosure", + table: "AuditDocumentClosure"); + + migrationBuilder.DropIndex( + name: "IX_AuditDocumentClosure_AncestorId", + table: "AuditDocumentClosure"); + + migrationBuilder.DropIndex( + name: "IX_AuditDocumentClosure_DescendantId", + table: "AuditDocumentClosure"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditDocument", + table: "AuditDocument"); + + migrationBuilder.DropIndex( + name: "IX_AuditDocument_CreateUserId", + table: "AuditDocument"); + + migrationBuilder.DropIndex( + name: "IX_AuditDocument_MainFileId", + table: "AuditDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Attachment", + table: "Attachment"); + + migrationBuilder.DropIndex( + name: "IX_Attachment_CreateUserId", + table: "Attachment"); + + migrationBuilder.DropIndex( + name: "IX_Attachment_DoctorId", + table: "Attachment"); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "IdentityUser", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + collation: "Chinese_PRC_CS_AS", + oldClrType: typeof(string), + oldType: "nvarchar(400)", + oldMaxLength: 400); + + migrationBuilder.AddPrimaryKey( + name: "PK_VolumeReward", + table: "VolumeReward", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitTaskReReading", + table: "VisitTaskReReading", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitTask", + table: "VisitTask", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitStage", + table: "VisitStage", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitPlanInfluenceStudy", + table: "VisitPlanInfluenceStudy", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitPlanInfluenceStat", + table: "VisitPlanInfluenceStat", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_VerificationCode", + table: "VerificationCode", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Vacation", + table: "Vacation", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserWLTemplate", + table: "UserWLTemplate", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserTypeMenu", + table: "UserTypeMenu", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserTypeGroup", + table: "UserTypeGroup", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserType", + table: "UserType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserPassWordLog", + table: "UserPassWordLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserLog", + table: "UserLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserFeedBack", + table: "UserFeedBack", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserAgreement", + table: "UserAgreement", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_User", + table: "User", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1BM", + table: "TumorAssessment_RECIST1Point1BM", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1", + table: "TumorAssessment_RECIST1Point1", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_IRECIST1Point1", + table: "TumorAssessment_IRECIST1Point1", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialVirtualSiteCodeUpdate", + table: "TrialVirtualSiteCodeUpdate", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialUser", + table: "TrialUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialTrianingRecord", + table: "TrialTrianingRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialStatus", + table: "TrialStatus", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialStateChange", + table: "TrialStateChange", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteUserSurvey", + table: "TrialSiteUserSurvey", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteUser", + table: "TrialSiteUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteSurvey", + table: "TrialSiteSurvey", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteEquipmentSurvey", + table: "TrialSiteEquipmentSurvey", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteDicomAE", + table: "TrialSiteDicomAE", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSite", + table: "TrialSite", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSign", + table: "TrialSign", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialRevenuesPriceVerification", + table: "TrialRevenuesPriceVerification", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialRevenuesPrice", + table: "TrialRevenuesPrice", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialQCQuestionAnswer", + table: "TrialQCQuestionAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialQCQuestion", + table: "TrialQCQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialPaymentPrice", + table: "TrialPaymentPrice", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialNormalRecord", + table: "TrialNormalRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialImageDownload", + table: "TrialImageDownload", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialIdentityUser", + table: "TrialIdentityUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialHistoryRecordFile", + table: "TrialHistoryRecordFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFinalRecord", + table: "TrialFinalRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFileType", + table: "TrialFileType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFile", + table: "TrialFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExternalUser", + table: "TrialExternalUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExperienceCriteria", + table: "TrialExperienceCriteria", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExperience", + table: "TrialExperience", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailNoticeUser", + table: "TrialEmailNoticeUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailNoticeConfig", + table: "TrialEmailNoticeConfig", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailBlackUser", + table: "TrialEmailBlackUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocumentAttachment", + table: "TrialDocumentAttachment", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocument", + table: "TrialDocument", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocNeedConfirmedUserType", + table: "TrialDocNeedConfirmedUserType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocConfirmedIdentityUser", + table: "TrialDocConfirmedIdentityUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDictionary", + table: "TrialDictionary", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDicomAE", + table: "TrialDicomAE", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionKeyFile", + table: "TrialCriterionKeyFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionDictionaryCode", + table: "TrialCriterionDictionaryCode", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionAdditionalAssessmentType", + table: "TrialCriterionAdditionalAssessmentType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalTableQuestion", + table: "TrialClinicalTableQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalQuestion", + table: "TrialClinicalQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalDataSetCriterion", + table: "TrialClinicalDataSetCriterion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialBodyPart", + table: "TrialBodyPart", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialAuditShow", + table: "TrialAuditShow", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Trial", + table: "Trial", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TestLength", + table: "TestLength", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskStudy", + table: "TaskStudy", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskSeries", + table: "TaskSeries", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskMedicalReviewRule", + table: "TaskMedicalReviewRule", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskMedicalReview", + table: "TaskMedicalReview", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskInstance", + table: "TaskInstance", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskInfluence", + table: "TaskInfluence", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskConsistentRule", + table: "TaskConsistentRule", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskAllocationRule", + table: "TaskAllocationRule", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNoticeUserType", + table: "SystemNoticeUserType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNoticeUserRead", + table: "SystemNoticeUserRead", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNotice", + table: "SystemNotice", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocumentAttachment", + table: "SystemDocumentAttachment", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocument", + table: "SystemDocument", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocNeedConfirmedUserType", + table: "SystemDocNeedConfirmedUserType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocConfirmedIdentityUser", + table: "SystemDocConfirmedIdentityUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemCriterionKeyFile", + table: "SystemCriterionKeyFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemCriterionDictionaryCode", + table: "SystemCriterionDictionaryCode", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemClinicalTableQuestion", + table: "SystemClinicalTableQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemClinicalQuestion", + table: "SystemClinicalQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemBasicData", + table: "SystemBasicData", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemAnonymization", + table: "SystemAnonymization", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SysFileType", + table: "SysFileType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectVisitImageBackRecord", + table: "SubjectVisitImageBackRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectVisit", + table: "SubjectVisit", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectUser", + table: "SubjectUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitStudyFilter", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitFilter", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluation", + table: "SubjectCriteriaEvaluation", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCanceDoctor", + table: "SubjectCanceDoctor", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectAdditionalEvaluationResult", + table: "SubjectAdditionalEvaluationResult", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Subject", + table: "Subject", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_StudyMonitor", + table: "StudyMonitor", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Sponsor", + table: "Sponsor", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Site", + table: "Site", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ShortcutKey", + table: "ShortcutKey", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPStudy", + table: "SCPStudy", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPSeries", + table: "SCPSeries", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPPatient", + table: "SCPPatient", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPInstance", + table: "SCPInstance", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPImageUpload", + table: "SCPImageUpload", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ResearchPublication", + table: "ResearchPublication", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadModuleCriterionFrom", + table: "ReadModuleCriterionFrom", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadModule", + table: "ReadModule", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTrialCriterionDictionary", + table: "ReadingTrialCriterionDictionary", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskRelation", + table: "ReadingTaskRelation", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskQuestionMark", + table: "ReadingTaskQuestionMark", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskQuestionAnswer", + table: "ReadingTaskQuestionAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionTrial", + table: "ReadingTableQuestionTrial", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionSystem", + table: "ReadingTableQuestionSystem", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionAnswer", + table: "ReadingTableQuestionAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableAnswerRowInfo", + table: "ReadingTableAnswerRowInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingSystemCriterionDictionary", + table: "ReadingSystemCriterionDictionary", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionTrial", + table: "ReadingQuestionTrial", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionSystem", + table: "ReadingQuestionSystem", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionCriterionTrial", + table: "ReadingQuestionCriterionTrial", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionCriterionSystem", + table: "ReadingQuestionCriterionSystem", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodSite", + table: "ReadingPeriodSite", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodSet", + table: "ReadingPeriodSet", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodPlan", + table: "ReadingPeriodPlan", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingOncologyTaskInfo", + table: "ReadingOncologyTaskInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingNoneDicomMarkBinding", + table: "ReadingNoneDicomMarkBinding", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingNoneDicomMark", + table: "ReadingNoneDicomMark", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineTrialQuestion", + table: "ReadingMedicineTrialQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineSystemQuestion", + table: "ReadingMedicineSystemQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineQuestionAnswer", + table: "ReadingMedicineQuestionAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicalReviewDialog", + table: "ReadingMedicalReviewDialog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingJudgeInfo", + table: "ReadingJudgeInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingImportFile", + table: "ReadingImportFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingGlobalTaskInfo", + table: "ReadingGlobalTaskInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingCustomTag", + table: "ReadingCustomTag", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingCriterionPage", + table: "ReadingCriterionPage", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingConsistentClinicalDataPDF", + table: "ReadingConsistentClinicalDataPDF", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingConsistentClinicalData", + table: "ReadingConsistentClinicalData", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingClinicalDataPDF", + table: "ReadingClinicalDataPDF", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingClinicalData", + table: "ReadingClinicalData", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_RankPrice", + table: "RankPrice", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCQuestion", + table: "QCQuestion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCChallengeDialog", + table: "QCChallengeDialog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCChallenge", + table: "QCChallenge", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PublishLog", + table: "PublishLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousSurgery", + table: "PreviousSurgery", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousPDF", + table: "PreviousPDF", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousOther", + table: "PreviousOther", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousHistory", + table: "PreviousHistory", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Postgraduate", + table: "Postgraduate", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PaymentDetail", + table: "PaymentDetail", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_PaymentAdjustment", + table: "PaymentAdjustment", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Payment", + table: "Payment", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_OrganTrialInfo", + table: "OrganTrialInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_OrganInfo", + table: "OrganInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_NoneDicomStudyFile", + table: "NoneDicomStudyFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_NoneDicomStudy", + table: "NoneDicomStudy", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Menu", + table: "Menu", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Internationalization", + table: "Internationalization", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_InspectionFile", + table: "InspectionFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ImageShare", + table: "ImageShare", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_IdentityUser", + table: "IdentityUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Hospital", + table: "Hospital", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_FrontAuditConfig", + table: "FrontAuditConfig", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExploreRecommend", + table: "ExploreRecommend", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExchangeRate", + table: "ExchangeRate", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EventStoreRecord", + table: "EventStoreRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollReadingCriterion", + table: "EnrollReadingCriterion", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollReadingCategory", + table: "EnrollReadingCategory", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollDetail", + table: "EnrollDetail", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Enroll", + table: "Enroll", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailReSendLog", + table: "EmailReSendLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailRecipientLog", + table: "EmailRecipientLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailNoticeUserType", + table: "EmailNoticeUserType", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailNoticeConfig", + table: "EmailNoticeConfig", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailLog", + table: "EmailLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailAttachmentLog", + table: "EmailAttachmentLog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Education", + table: "Education", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorWorkload", + table: "DoctorWorkload", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorSummarize", + table: "DoctorSummarize", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorPayInformation", + table: "DoctorPayInformation", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorDictionary", + table: "DoctorDictionary", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorCriterionFile", + table: "DoctorCriterionFile", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Doctor", + table: "Doctor", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Dictionary", + table: "Dictionary", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomStudy", + table: "DicomStudy", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomSeries", + table: "DicomSeries", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomInstance", + table: "DicomInstance", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_DataInspection", + table: "DataInspection", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CROCompany", + table: "CROCompany", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionNidusTrial", + table: "CriterionNidusTrial", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionNidusSystem", + table: "CriterionNidusSystem", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionKeyFileRead", + table: "CriterionKeyFileRead", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CommonDocument", + table: "CommonDocument", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalTableAnswer", + table: "ClinicalTableAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalQuestionAnswer", + table: "ClinicalQuestionAnswer", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalForm", + table: "ClinicalForm", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalDataTrialSet", + table: "ClinicalDataTrialSet", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalDataSystemSet", + table: "ClinicalDataSystemSet", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalAnswerRowInfo", + table: "ClinicalAnswerRowInfo", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_CheckChallengeDialog", + table: "CheckChallengeDialog", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecordPermission", + table: "AuditRecordPermission", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecordIdentityUser", + table: "AuditRecordIdentityUser", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecord", + table: "AuditRecord", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditDocumentClosure", + table: "AuditDocumentClosure", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditDocument", + table: "AuditDocument", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.AddPrimaryKey( + name: "PK_Attachment", + table: "Attachment", + column: "Id") + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.CreateIndex( + name: "IX_VolumeReward_CreateTime", + table: "VolumeReward", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_CreateTime", + table: "VisitTaskReReading", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_CreateTime", + table: "VisitTask", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VisitStage_CreateTime", + table: "VisitStage", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStudy_CreateTime", + table: "VisitPlanInfluenceStudy", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStat_CreateTime", + table: "VisitPlanInfluenceStat", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_VerificationCode_CreateTime", + table: "VerificationCode", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Vacation_CreateTime", + table: "Vacation", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_UserWLTemplate_CreateTime", + table: "UserWLTemplate", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_UserPassWordLog_CreateTime", + table: "UserPassWordLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_CreateTime", + table: "UserLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_CreateTime", + table: "UserFeedBack", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_UserAgreement_CreateTime", + table: "UserAgreement", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_User_CreateTime", + table: "User", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialVirtualSiteCodeUpdate_CreateTime", + table: "TrialVirtualSiteCodeUpdate", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_CreateTime", + table: "TrialUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialTrianingRecord_CreateTime", + table: "TrialTrianingRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialStatus_CreateTime", + table: "TrialStatus", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialStateChange_CreateTime", + table: "TrialStateChange", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUserSurvey_CreateTime", + table: "TrialSiteUserSurvey", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUser_CreateTime", + table: "TrialSiteUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_CreateTime", + table: "TrialSiteSurvey", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteEquipmentSurvey_CreateTime", + table: "TrialSiteEquipmentSurvey", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteDicomAE_CreateTime", + table: "TrialSiteDicomAE", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSite_CreateTime", + table: "TrialSite", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialSign_CreateTime", + table: "TrialSign", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialRevenuesPrice_CreateTime", + table: "TrialRevenuesPrice", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestionAnswer_CreateTime", + table: "TrialQCQuestionAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestion_CreateTime", + table: "TrialQCQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialPaymentPrice_CreateTime", + table: "TrialPaymentPrice", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialNormalRecord_CreateTime", + table: "TrialNormalRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialImageDownload_CreateTime", + table: "TrialImageDownload", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_CreateTime", + table: "TrialIdentityUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialHistoryRecordFile_CreateTime", + table: "TrialHistoryRecordFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_CreateTime", + table: "TrialFinalRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialFileType_CreateTime", + table: "TrialFileType", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialFile_CreateTime", + table: "TrialFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialExternalUser_CreateTime", + table: "TrialExternalUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperience_CreateTime", + table: "TrialExperience", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeConfig_CreateTime", + table: "TrialEmailNoticeConfig", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocumentAttachment_CreateTime", + table: "TrialDocumentAttachment", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocument_CreateTime", + table: "TrialDocument", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_CreateTime", + table: "TrialDocConfirmedIdentityUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialDicomAE_CreateTime", + table: "TrialDicomAE", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionKeyFile_CreateTime", + table: "TrialCriterionKeyFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionDictionaryCode_CreateTime", + table: "TrialCriterionDictionaryCode", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_CreateTime", + table: "TrialCriterionAdditionalAssessmentType", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalTableQuestion_CreateTime", + table: "TrialClinicalTableQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalQuestion_CreateTime", + table: "TrialClinicalQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalDataSetCriterion_CreateTime", + table: "TrialClinicalDataSetCriterion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialBodyPart_CreateTime", + table: "TrialBodyPart", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TrialAuditShow_CreateTime", + table: "TrialAuditShow", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Trial_CreateTime", + table: "Trial", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskStudy_CreateTime", + table: "TaskStudy", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskSeries_CreateTime", + table: "TaskSeries", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReviewRule_CreateTime", + table: "TaskMedicalReviewRule", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_CreateTime", + table: "TaskMedicalReview", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskInstance_CreateTime", + table: "TaskInstance", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskInfluence_CreateTime", + table: "TaskInfluence", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskConsistentRule_CreateTime", + table: "TaskConsistentRule", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_TaskAllocationRule_CreateTime", + table: "TaskAllocationRule", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserType_CreateTime", + table: "SystemNoticeUserType", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserRead_CreateTime", + table: "SystemNoticeUserRead", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemNotice_CreateTime", + table: "SystemNotice", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocumentAttachment_CreateTime", + table: "SystemDocumentAttachment", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocument_CreateTime", + table: "SystemDocument", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_CreateTime", + table: "SystemDocConfirmedIdentityUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemCriterionKeyFile_CreateTime", + table: "SystemCriterionKeyFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemCriterionDictionaryCode_CreateTime", + table: "SystemCriterionDictionaryCode", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemClinicalTableQuestion_CreateTime", + table: "SystemClinicalTableQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemClinicalQuestion_CreateTime", + table: "SystemClinicalQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemBasicData_CreateTime", + table: "SystemBasicData", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SystemAnonymization_CreateTime", + table: "SystemAnonymization", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SysFileType_CreateTime", + table: "SysFileType", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisitImageBackRecord_CreateTime", + table: "SubjectVisitImageBackRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_CreateTime", + table: "SubjectVisit", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_CreateTime", + table: "SubjectUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_CreateTime", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_CreateTime", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluation_CreateTime", + table: "SubjectCriteriaEvaluation", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCanceDoctor_CreateTime", + table: "SubjectCanceDoctor", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SubjectAdditionalEvaluationResult_CreateTime", + table: "SubjectAdditionalEvaluationResult", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Subject_CreateTime", + table: "Subject", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_CreateTime", + table: "StudyMonitor", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Sponsor_CreateTime", + table: "Sponsor", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Site_CreateTime", + table: "Site", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ShortcutKey_CreateTime", + table: "ShortcutKey", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_CreateTime", + table: "SCPStudy", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SCPSeries_CreateTime", + table: "SCPSeries", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SCPPatient_CreateTime", + table: "SCPPatient", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SCPInstance_CreateTime", + table: "SCPInstance", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_SCPImageUpload_CreateTime", + table: "SCPImageUpload", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ResearchPublication_CreateTime", + table: "ResearchPublication", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadModuleCriterionFrom_CreateTime", + table: "ReadModuleCriterionFrom", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_CreateTime", + table: "ReadModule", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTrialCriterionDictionary_CreateTime", + table: "ReadingTrialCriterionDictionary", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskRelation_CreateTime", + table: "ReadingTaskRelation", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionMark_CreateTime", + table: "ReadingTaskQuestionMark", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionAnswer_CreateTime", + table: "ReadingTaskQuestionAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionTrial_CreateTime", + table: "ReadingTableQuestionTrial", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionSystem_CreateTime", + table: "ReadingTableQuestionSystem", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_CreateTime", + table: "ReadingTableQuestionAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_CreateTime", + table: "ReadingTableAnswerRowInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingSystemCriterionDictionary_CreateTime", + table: "ReadingSystemCriterionDictionary", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_CreateTime", + table: "ReadingQuestionTrial", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_CreateTime", + table: "ReadingQuestionSystem", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionCriterionTrial_CreateTime", + table: "ReadingQuestionCriterionTrial", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionCriterionSystem_CreateTime", + table: "ReadingQuestionCriterionSystem", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSite_CreateTime", + table: "ReadingPeriodSite", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSet_CreateTime", + table: "ReadingPeriodSet", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodPlan_CreateTime", + table: "ReadingPeriodPlan", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingOncologyTaskInfo_CreateTime", + table: "ReadingOncologyTaskInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMarkBinding_CreateTime", + table: "ReadingNoneDicomMarkBinding", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMark_CreateTime", + table: "ReadingNoneDicomMark", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineTrialQuestion_CreateTime", + table: "ReadingMedicineTrialQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineSystemQuestion_CreateTime", + table: "ReadingMedicineSystemQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineQuestionAnswer_CreateTime", + table: "ReadingMedicineQuestionAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicalReviewDialog_CreateTime", + table: "ReadingMedicalReviewDialog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingJudgeInfo_CreateTime", + table: "ReadingJudgeInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingImportFile_CreateTime", + table: "ReadingImportFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingGlobalTaskInfo_CreateTime", + table: "ReadingGlobalTaskInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingCustomTag_CreateTime", + table: "ReadingCustomTag", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingCriterionPage_CreateTime", + table: "ReadingCriterionPage", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalDataPDF_CreateTime", + table: "ReadingConsistentClinicalDataPDF", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_CreateTime", + table: "ReadingConsistentClinicalData", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalDataPDF_CreateTime", + table: "ReadingClinicalDataPDF", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_CreateTime", + table: "ReadingClinicalData", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_RankPrice_CreateTime", + table: "RankPrice", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_QCQuestion_CreateTime", + table: "QCQuestion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_QCChallengeDialog_CreateTime", + table: "QCChallengeDialog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_QCChallenge_CreateTime", + table: "QCChallenge", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PublishLog_CreateTime", + table: "PublishLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PreviousSurgery_CreateTime", + table: "PreviousSurgery", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PreviousPDF_CreateTime", + table: "PreviousPDF", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PreviousOther_CreateTime", + table: "PreviousOther", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PreviousHistory_CreateTime", + table: "PreviousHistory", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Postgraduate_CreateTime", + table: "Postgraduate", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PaymentDetail_CreateTime", + table: "PaymentDetail", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_PaymentAdjustment_CreateTime", + table: "PaymentAdjustment", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Payment_CreateTime", + table: "Payment", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_OrganTrialInfo_CreateTime", + table: "OrganTrialInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_OrganInfo_CreateTime", + table: "OrganInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_CreateTime", + table: "NoneDicomStudyFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudy_CreateTime", + table: "NoneDicomStudy", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Menu_CreateTime", + table: "Menu", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Internationalization_CreateTime", + table: "Internationalization", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_InspectionFile_CreateTime", + table: "InspectionFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityUser_CreateTime", + table: "IdentityUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Hospital_CreateTime", + table: "Hospital", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_FrontAuditConfig_CreateTime", + table: "FrontAuditConfig", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ExploreRecommend_CreateTime", + table: "ExploreRecommend", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ExchangeRate_CreateTime", + table: "ExchangeRate", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EventStoreRecord_CreateTime", + table: "EventStoreRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCriterion_CreateTime", + table: "EnrollReadingCriterion", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCategory_CreateTime", + table: "EnrollReadingCategory", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EnrollDetail_CreateTime", + table: "EnrollDetail", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Enroll_CreateTime", + table: "Enroll", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EmailReSendLog_CreateTime", + table: "EmailReSendLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EmailRecipientLog_CreateTime", + table: "EmailRecipientLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EmailNoticeConfig_CreateTime", + table: "EmailNoticeConfig", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EmailLog_CreateTime", + table: "EmailLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_EmailAttachmentLog_CreateTime", + table: "EmailAttachmentLog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Education_CreateTime", + table: "Education", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DoctorWorkload_CreateTime", + table: "DoctorWorkload", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DoctorSummarize_CreateTime", + table: "DoctorSummarize", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DoctorPayInformation_CreateTime", + table: "DoctorPayInformation", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DoctorCriterionFile_CreateTime", + table: "DoctorCriterionFile", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_CreateTime", + table: "Doctor", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Dictionary_CreateTime", + table: "Dictionary", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DicomStudy_CreateTime", + table: "DicomStudy", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DicomSeries_CreateTime", + table: "DicomSeries", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DicomInstance_CreateTime", + table: "DicomInstance", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_DataInspection_CreateTime", + table: "DataInspection", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CROCompany_CreateTime", + table: "CROCompany", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CriterionNidusTrial_CreateTime", + table: "CriterionNidusTrial", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CriterionNidusSystem_CreateTime", + table: "CriterionNidusSystem", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CriterionKeyFileRead_CreateTime", + table: "CriterionKeyFileRead", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CommonDocument_CreateTime", + table: "CommonDocument", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalTableAnswer_CreateTime", + table: "ClinicalTableAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalQuestionAnswer_CreateTime", + table: "ClinicalQuestionAnswer", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalForm_CreateTime", + table: "ClinicalForm", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataTrialSet_CreateTime", + table: "ClinicalDataTrialSet", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataSystemSet_CreateTime", + table: "ClinicalDataSystemSet", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalAnswerRowInfo_CreateTime", + table: "ClinicalAnswerRowInfo", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_CheckChallengeDialog_CreateTime", + table: "CheckChallengeDialog", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordPermission_CreateTime", + table: "AuditRecordPermission", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordIdentityUser_CreateTime", + table: "AuditRecordIdentityUser", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecord_CreateTime", + table: "AuditRecord", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_AuditDocument_CreateTime", + table: "AuditDocument", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_Attachment_CreateTime", + table: "Attachment", + column: "CreateTime") + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.AddForeignKey( + name: "FK_ReadingClinicalData_DicomStudy_StudyId", + table: "ReadingClinicalData", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ReadingConsistentClinicalData_DicomStudy_StudyId", + table: "ReadingConsistentClinicalData", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_StudyMonitor_TaskStudy_StudyId", + table: "StudyMonitor", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_ReadingClinicalData_DicomStudy_StudyId", + table: "ReadingClinicalData"); + + migrationBuilder.DropForeignKey( + name: "FK_ReadingConsistentClinicalData_DicomStudy_StudyId", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropForeignKey( + name: "FK_StudyMonitor_TaskStudy_StudyId", + table: "StudyMonitor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VolumeReward", + table: "VolumeReward"); + + migrationBuilder.DropIndex( + name: "IX_VolumeReward_CreateTime", + table: "VolumeReward"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitTaskReReading", + table: "VisitTaskReReading"); + + migrationBuilder.DropIndex( + name: "IX_VisitTaskReReading_CreateTime", + table: "VisitTaskReReading"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitTask", + table: "VisitTask"); + + migrationBuilder.DropIndex( + name: "IX_VisitTask_CreateTime", + table: "VisitTask"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitStage", + table: "VisitStage"); + + migrationBuilder.DropIndex( + name: "IX_VisitStage_CreateTime", + table: "VisitStage"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitPlanInfluenceStudy", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStudy_CreateTime", + table: "VisitPlanInfluenceStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VisitPlanInfluenceStat", + table: "VisitPlanInfluenceStat"); + + migrationBuilder.DropIndex( + name: "IX_VisitPlanInfluenceStat_CreateTime", + table: "VisitPlanInfluenceStat"); + + migrationBuilder.DropPrimaryKey( + name: "PK_VerificationCode", + table: "VerificationCode"); + + migrationBuilder.DropIndex( + name: "IX_VerificationCode_CreateTime", + table: "VerificationCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Vacation", + table: "Vacation"); + + migrationBuilder.DropIndex( + name: "IX_Vacation_CreateTime", + table: "Vacation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserWLTemplate", + table: "UserWLTemplate"); + + migrationBuilder.DropIndex( + name: "IX_UserWLTemplate_CreateTime", + table: "UserWLTemplate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserTypeMenu", + table: "UserTypeMenu"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserTypeGroup", + table: "UserTypeGroup"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserType", + table: "UserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserPassWordLog", + table: "UserPassWordLog"); + + migrationBuilder.DropIndex( + name: "IX_UserPassWordLog_CreateTime", + table: "UserPassWordLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserLog", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_CreateTime", + table: "UserLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserFeedBack", + table: "UserFeedBack"); + + migrationBuilder.DropIndex( + name: "IX_UserFeedBack_CreateTime", + table: "UserFeedBack"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserAgreement", + table: "UserAgreement"); + + migrationBuilder.DropIndex( + name: "IX_UserAgreement_CreateTime", + table: "UserAgreement"); + + migrationBuilder.DropPrimaryKey( + name: "PK_User", + table: "User"); + + migrationBuilder.DropIndex( + name: "IX_User_CreateTime", + table: "User"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1BM", + table: "TumorAssessment_RECIST1Point1BM"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1", + table: "TumorAssessment_RECIST1Point1"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TumorAssessment_IRECIST1Point1", + table: "TumorAssessment_IRECIST1Point1"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialVirtualSiteCodeUpdate", + table: "TrialVirtualSiteCodeUpdate"); + + migrationBuilder.DropIndex( + name: "IX_TrialVirtualSiteCodeUpdate_CreateTime", + table: "TrialVirtualSiteCodeUpdate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialUser", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_CreateTime", + table: "TrialUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialTrianingRecord", + table: "TrialTrianingRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialTrianingRecord_CreateTime", + table: "TrialTrianingRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialStatus", + table: "TrialStatus"); + + migrationBuilder.DropIndex( + name: "IX_TrialStatus_CreateTime", + table: "TrialStatus"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialStateChange", + table: "TrialStateChange"); + + migrationBuilder.DropIndex( + name: "IX_TrialStateChange_CreateTime", + table: "TrialStateChange"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteUserSurvey", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUserSurvey_CreateTime", + table: "TrialSiteUserSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteUser", + table: "TrialSiteUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteUser_CreateTime", + table: "TrialSiteUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteSurvey", + table: "TrialSiteSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteSurvey_CreateTime", + table: "TrialSiteSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteEquipmentSurvey", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteEquipmentSurvey_CreateTime", + table: "TrialSiteEquipmentSurvey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSiteDicomAE", + table: "TrialSiteDicomAE"); + + migrationBuilder.DropIndex( + name: "IX_TrialSiteDicomAE_CreateTime", + table: "TrialSiteDicomAE"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSite", + table: "TrialSite"); + + migrationBuilder.DropIndex( + name: "IX_TrialSite_CreateTime", + table: "TrialSite"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialSign", + table: "TrialSign"); + + migrationBuilder.DropIndex( + name: "IX_TrialSign_CreateTime", + table: "TrialSign"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialRevenuesPriceVerification", + table: "TrialRevenuesPriceVerification"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialRevenuesPrice", + table: "TrialRevenuesPrice"); + + migrationBuilder.DropIndex( + name: "IX_TrialRevenuesPrice_CreateTime", + table: "TrialRevenuesPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialQCQuestionAnswer", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestionAnswer_CreateTime", + table: "TrialQCQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialQCQuestion", + table: "TrialQCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialQCQuestion_CreateTime", + table: "TrialQCQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialPaymentPrice", + table: "TrialPaymentPrice"); + + migrationBuilder.DropIndex( + name: "IX_TrialPaymentPrice_CreateTime", + table: "TrialPaymentPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialNormalRecord", + table: "TrialNormalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialNormalRecord_CreateTime", + table: "TrialNormalRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialImageDownload", + table: "TrialImageDownload"); + + migrationBuilder.DropIndex( + name: "IX_TrialImageDownload_CreateTime", + table: "TrialImageDownload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialIdentityUser", + table: "TrialIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialIdentityUser_CreateTime", + table: "TrialIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialHistoryRecordFile", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialHistoryRecordFile_CreateTime", + table: "TrialHistoryRecordFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFinalRecord", + table: "TrialFinalRecord"); + + migrationBuilder.DropIndex( + name: "IX_TrialFinalRecord_CreateTime", + table: "TrialFinalRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFileType", + table: "TrialFileType"); + + migrationBuilder.DropIndex( + name: "IX_TrialFileType_CreateTime", + table: "TrialFileType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialFile", + table: "TrialFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialFile_CreateTime", + table: "TrialFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExternalUser", + table: "TrialExternalUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialExternalUser_CreateTime", + table: "TrialExternalUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExperienceCriteria", + table: "TrialExperienceCriteria"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialExperience", + table: "TrialExperience"); + + migrationBuilder.DropIndex( + name: "IX_TrialExperience_CreateTime", + table: "TrialExperience"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailNoticeUser", + table: "TrialEmailNoticeUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailNoticeConfig", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_TrialEmailNoticeConfig_CreateTime", + table: "TrialEmailNoticeConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialEmailBlackUser", + table: "TrialEmailBlackUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocumentAttachment", + table: "TrialDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocumentAttachment_CreateTime", + table: "TrialDocumentAttachment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocument", + table: "TrialDocument"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocument_CreateTime", + table: "TrialDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocNeedConfirmedUserType", + table: "TrialDocNeedConfirmedUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDocConfirmedIdentityUser", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialDocConfirmedIdentityUser_CreateTime", + table: "TrialDocConfirmedIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDictionary", + table: "TrialDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialDicomAE", + table: "TrialDicomAE"); + + migrationBuilder.DropIndex( + name: "IX_TrialDicomAE_CreateTime", + table: "TrialDicomAE"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionKeyFile", + table: "TrialCriterionKeyFile"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionKeyFile_CreateTime", + table: "TrialCriterionKeyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionDictionaryCode", + table: "TrialCriterionDictionaryCode"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionDictionaryCode_CreateTime", + table: "TrialCriterionDictionaryCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialCriterionAdditionalAssessmentType", + table: "TrialCriterionAdditionalAssessmentType"); + + migrationBuilder.DropIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_CreateTime", + table: "TrialCriterionAdditionalAssessmentType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalTableQuestion", + table: "TrialClinicalTableQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalTableQuestion_CreateTime", + table: "TrialClinicalTableQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalQuestion", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalQuestion_CreateTime", + table: "TrialClinicalQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialClinicalDataSetCriterion", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropIndex( + name: "IX_TrialClinicalDataSetCriterion_CreateTime", + table: "TrialClinicalDataSetCriterion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialBodyPart", + table: "TrialBodyPart"); + + migrationBuilder.DropIndex( + name: "IX_TrialBodyPart_CreateTime", + table: "TrialBodyPart"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TrialAuditShow", + table: "TrialAuditShow"); + + migrationBuilder.DropIndex( + name: "IX_TrialAuditShow_CreateTime", + table: "TrialAuditShow"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Trial", + table: "Trial"); + + migrationBuilder.DropIndex( + name: "IX_Trial_CreateTime", + table: "Trial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TestLength", + table: "TestLength"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskStudy", + table: "TaskStudy"); + + migrationBuilder.DropIndex( + name: "IX_TaskStudy_CreateTime", + table: "TaskStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskSeries", + table: "TaskSeries"); + + migrationBuilder.DropIndex( + name: "IX_TaskSeries_CreateTime", + table: "TaskSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskMedicalReviewRule", + table: "TaskMedicalReviewRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReviewRule_CreateTime", + table: "TaskMedicalReviewRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskMedicalReview", + table: "TaskMedicalReview"); + + migrationBuilder.DropIndex( + name: "IX_TaskMedicalReview_CreateTime", + table: "TaskMedicalReview"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskInstance", + table: "TaskInstance"); + + migrationBuilder.DropIndex( + name: "IX_TaskInstance_CreateTime", + table: "TaskInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskInfluence", + table: "TaskInfluence"); + + migrationBuilder.DropIndex( + name: "IX_TaskInfluence_CreateTime", + table: "TaskInfluence"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskConsistentRule", + table: "TaskConsistentRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskConsistentRule_CreateTime", + table: "TaskConsistentRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_TaskAllocationRule", + table: "TaskAllocationRule"); + + migrationBuilder.DropIndex( + name: "IX_TaskAllocationRule_CreateTime", + table: "TaskAllocationRule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNoticeUserType", + table: "SystemNoticeUserType"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserType_CreateTime", + table: "SystemNoticeUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNoticeUserRead", + table: "SystemNoticeUserRead"); + + migrationBuilder.DropIndex( + name: "IX_SystemNoticeUserRead_CreateTime", + table: "SystemNoticeUserRead"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemNotice", + table: "SystemNotice"); + + migrationBuilder.DropIndex( + name: "IX_SystemNotice_CreateTime", + table: "SystemNotice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocumentAttachment", + table: "SystemDocumentAttachment"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocumentAttachment_CreateTime", + table: "SystemDocumentAttachment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocument", + table: "SystemDocument"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocument_CreateTime", + table: "SystemDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocNeedConfirmedUserType", + table: "SystemDocNeedConfirmedUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemDocConfirmedIdentityUser", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_SystemDocConfirmedIdentityUser_CreateTime", + table: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemCriterionKeyFile", + table: "SystemCriterionKeyFile"); + + migrationBuilder.DropIndex( + name: "IX_SystemCriterionKeyFile_CreateTime", + table: "SystemCriterionKeyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemCriterionDictionaryCode", + table: "SystemCriterionDictionaryCode"); + + migrationBuilder.DropIndex( + name: "IX_SystemCriterionDictionaryCode_CreateTime", + table: "SystemCriterionDictionaryCode"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemClinicalTableQuestion", + table: "SystemClinicalTableQuestion"); + + migrationBuilder.DropIndex( + name: "IX_SystemClinicalTableQuestion_CreateTime", + table: "SystemClinicalTableQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemClinicalQuestion", + table: "SystemClinicalQuestion"); + + migrationBuilder.DropIndex( + name: "IX_SystemClinicalQuestion_CreateTime", + table: "SystemClinicalQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemBasicData", + table: "SystemBasicData"); + + migrationBuilder.DropIndex( + name: "IX_SystemBasicData_CreateTime", + table: "SystemBasicData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SystemAnonymization", + table: "SystemAnonymization"); + + migrationBuilder.DropIndex( + name: "IX_SystemAnonymization_CreateTime", + table: "SystemAnonymization"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SysFileType", + table: "SysFileType"); + + migrationBuilder.DropIndex( + name: "IX_SysFileType_CreateTime", + table: "SysFileType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectVisitImageBackRecord", + table: "SubjectVisitImageBackRecord"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisitImageBackRecord_CreateTime", + table: "SubjectVisitImageBackRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectVisit", + table: "SubjectVisit"); + + migrationBuilder.DropIndex( + name: "IX_SubjectVisit_CreateTime", + table: "SubjectVisit"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectUser", + table: "SubjectUser"); + + migrationBuilder.DropIndex( + name: "IX_SubjectUser_CreateTime", + table: "SubjectUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitStudyFilter", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_CreateTime", + table: "SubjectCriteriaEvaluationVisitStudyFilter"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitFilter", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_CreateTime", + table: "SubjectCriteriaEvaluationVisitFilter"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCriteriaEvaluation", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCriteriaEvaluation_CreateTime", + table: "SubjectCriteriaEvaluation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectCanceDoctor", + table: "SubjectCanceDoctor"); + + migrationBuilder.DropIndex( + name: "IX_SubjectCanceDoctor_CreateTime", + table: "SubjectCanceDoctor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SubjectAdditionalEvaluationResult", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropIndex( + name: "IX_SubjectAdditionalEvaluationResult_CreateTime", + table: "SubjectAdditionalEvaluationResult"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Subject", + table: "Subject"); + + migrationBuilder.DropIndex( + name: "IX_Subject_CreateTime", + table: "Subject"); + + migrationBuilder.DropPrimaryKey( + name: "PK_StudyMonitor", + table: "StudyMonitor"); + + migrationBuilder.DropIndex( + name: "IX_StudyMonitor_CreateTime", + table: "StudyMonitor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Sponsor", + table: "Sponsor"); + + migrationBuilder.DropIndex( + name: "IX_Sponsor_CreateTime", + table: "Sponsor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Site", + table: "Site"); + + migrationBuilder.DropIndex( + name: "IX_Site_CreateTime", + table: "Site"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ShortcutKey", + table: "ShortcutKey"); + + migrationBuilder.DropIndex( + name: "IX_ShortcutKey_CreateTime", + table: "ShortcutKey"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPStudy", + table: "SCPStudy"); + + migrationBuilder.DropIndex( + name: "IX_SCPStudy_CreateTime", + table: "SCPStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPSeries", + table: "SCPSeries"); + + migrationBuilder.DropIndex( + name: "IX_SCPSeries_CreateTime", + table: "SCPSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPPatient", + table: "SCPPatient"); + + migrationBuilder.DropIndex( + name: "IX_SCPPatient_CreateTime", + table: "SCPPatient"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPInstance", + table: "SCPInstance"); + + migrationBuilder.DropIndex( + name: "IX_SCPInstance_CreateTime", + table: "SCPInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SCPImageUpload", + table: "SCPImageUpload"); + + migrationBuilder.DropIndex( + name: "IX_SCPImageUpload_CreateTime", + table: "SCPImageUpload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ResearchPublication", + table: "ResearchPublication"); + + migrationBuilder.DropIndex( + name: "IX_ResearchPublication_CreateTime", + table: "ResearchPublication"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadModuleCriterionFrom", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropIndex( + name: "IX_ReadModuleCriterionFrom_CreateTime", + table: "ReadModuleCriterionFrom"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadModule", + table: "ReadModule"); + + migrationBuilder.DropIndex( + name: "IX_ReadModule_CreateTime", + table: "ReadModule"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTrialCriterionDictionary", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTrialCriterionDictionary_CreateTime", + table: "ReadingTrialCriterionDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskRelation", + table: "ReadingTaskRelation"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskRelation_CreateTime", + table: "ReadingTaskRelation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskQuestionMark", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionMark_CreateTime", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTaskQuestionAnswer", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTaskQuestionAnswer_CreateTime", + table: "ReadingTaskQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionTrial", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionTrial_CreateTime", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionSystem", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionSystem_CreateTime", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableQuestionAnswer", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableQuestionAnswer_CreateTime", + table: "ReadingTableQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingTableAnswerRowInfo", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingTableAnswerRowInfo_CreateTime", + table: "ReadingTableAnswerRowInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingSystemCriterionDictionary", + table: "ReadingSystemCriterionDictionary"); + + migrationBuilder.DropIndex( + name: "IX_ReadingSystemCriterionDictionary_CreateTime", + table: "ReadingSystemCriterionDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionTrial", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionTrial_CreateTime", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionSystem", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionSystem_CreateTime", + table: "ReadingQuestionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionCriterionTrial", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionCriterionTrial_CreateTime", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingQuestionCriterionSystem", + table: "ReadingQuestionCriterionSystem"); + + migrationBuilder.DropIndex( + name: "IX_ReadingQuestionCriterionSystem_CreateTime", + table: "ReadingQuestionCriterionSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodSite", + table: "ReadingPeriodSite"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSite_CreateTime", + table: "ReadingPeriodSite"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodSet", + table: "ReadingPeriodSet"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodSet_CreateTime", + table: "ReadingPeriodSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingPeriodPlan", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropIndex( + name: "IX_ReadingPeriodPlan_CreateTime", + table: "ReadingPeriodPlan"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingOncologyTaskInfo", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingOncologyTaskInfo_CreateTime", + table: "ReadingOncologyTaskInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingNoneDicomMarkBinding", + table: "ReadingNoneDicomMarkBinding"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMarkBinding_CreateTime", + table: "ReadingNoneDicomMarkBinding"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingNoneDicomMark", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropIndex( + name: "IX_ReadingNoneDicomMark_CreateTime", + table: "ReadingNoneDicomMark"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineTrialQuestion", + table: "ReadingMedicineTrialQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineTrialQuestion_CreateTime", + table: "ReadingMedicineTrialQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineSystemQuestion", + table: "ReadingMedicineSystemQuestion"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineSystemQuestion_CreateTime", + table: "ReadingMedicineSystemQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicineQuestionAnswer", + table: "ReadingMedicineQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicineQuestionAnswer_CreateTime", + table: "ReadingMedicineQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingMedicalReviewDialog", + table: "ReadingMedicalReviewDialog"); + + migrationBuilder.DropIndex( + name: "IX_ReadingMedicalReviewDialog_CreateTime", + table: "ReadingMedicalReviewDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingJudgeInfo", + table: "ReadingJudgeInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingJudgeInfo_CreateTime", + table: "ReadingJudgeInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingImportFile", + table: "ReadingImportFile"); + + migrationBuilder.DropIndex( + name: "IX_ReadingImportFile_CreateTime", + table: "ReadingImportFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingGlobalTaskInfo", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropIndex( + name: "IX_ReadingGlobalTaskInfo_CreateTime", + table: "ReadingGlobalTaskInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingCustomTag", + table: "ReadingCustomTag"); + + migrationBuilder.DropIndex( + name: "IX_ReadingCustomTag_CreateTime", + table: "ReadingCustomTag"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingCriterionPage", + table: "ReadingCriterionPage"); + + migrationBuilder.DropIndex( + name: "IX_ReadingCriterionPage_CreateTime", + table: "ReadingCriterionPage"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingConsistentClinicalDataPDF", + table: "ReadingConsistentClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalDataPDF_CreateTime", + table: "ReadingConsistentClinicalDataPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingConsistentClinicalData", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingConsistentClinicalData_CreateTime", + table: "ReadingConsistentClinicalData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingClinicalDataPDF", + table: "ReadingClinicalDataPDF"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalDataPDF_CreateTime", + table: "ReadingClinicalDataPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ReadingClinicalData", + table: "ReadingClinicalData"); + + migrationBuilder.DropIndex( + name: "IX_ReadingClinicalData_CreateTime", + table: "ReadingClinicalData"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RankPrice", + table: "RankPrice"); + + migrationBuilder.DropIndex( + name: "IX_RankPrice_CreateTime", + table: "RankPrice"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCQuestion", + table: "QCQuestion"); + + migrationBuilder.DropIndex( + name: "IX_QCQuestion_CreateTime", + table: "QCQuestion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCChallengeDialog", + table: "QCChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_QCChallengeDialog_CreateTime", + table: "QCChallengeDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_QCChallenge", + table: "QCChallenge"); + + migrationBuilder.DropIndex( + name: "IX_QCChallenge_CreateTime", + table: "QCChallenge"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PublishLog", + table: "PublishLog"); + + migrationBuilder.DropIndex( + name: "IX_PublishLog_CreateTime", + table: "PublishLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousSurgery", + table: "PreviousSurgery"); + + migrationBuilder.DropIndex( + name: "IX_PreviousSurgery_CreateTime", + table: "PreviousSurgery"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousPDF", + table: "PreviousPDF"); + + migrationBuilder.DropIndex( + name: "IX_PreviousPDF_CreateTime", + table: "PreviousPDF"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousOther", + table: "PreviousOther"); + + migrationBuilder.DropIndex( + name: "IX_PreviousOther_CreateTime", + table: "PreviousOther"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PreviousHistory", + table: "PreviousHistory"); + + migrationBuilder.DropIndex( + name: "IX_PreviousHistory_CreateTime", + table: "PreviousHistory"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Postgraduate", + table: "Postgraduate"); + + migrationBuilder.DropIndex( + name: "IX_Postgraduate_CreateTime", + table: "Postgraduate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PaymentDetail", + table: "PaymentDetail"); + + migrationBuilder.DropIndex( + name: "IX_PaymentDetail_CreateTime", + table: "PaymentDetail"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PaymentAdjustment", + table: "PaymentAdjustment"); + + migrationBuilder.DropIndex( + name: "IX_PaymentAdjustment_CreateTime", + table: "PaymentAdjustment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Payment", + table: "Payment"); + + migrationBuilder.DropIndex( + name: "IX_Payment_CreateTime", + table: "Payment"); + + migrationBuilder.DropPrimaryKey( + name: "PK_OrganTrialInfo", + table: "OrganTrialInfo"); + + migrationBuilder.DropIndex( + name: "IX_OrganTrialInfo_CreateTime", + table: "OrganTrialInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_OrganInfo", + table: "OrganInfo"); + + migrationBuilder.DropIndex( + name: "IX_OrganInfo_CreateTime", + table: "OrganInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_NoneDicomStudyFile", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudyFile_CreateTime", + table: "NoneDicomStudyFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_NoneDicomStudy", + table: "NoneDicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_NoneDicomStudy_CreateTime", + table: "NoneDicomStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Menu", + table: "Menu"); + + migrationBuilder.DropIndex( + name: "IX_Menu_CreateTime", + table: "Menu"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Internationalization", + table: "Internationalization"); + + migrationBuilder.DropIndex( + name: "IX_Internationalization_CreateTime", + table: "Internationalization"); + + migrationBuilder.DropPrimaryKey( + name: "PK_InspectionFile", + table: "InspectionFile"); + + migrationBuilder.DropIndex( + name: "IX_InspectionFile_CreateTime", + table: "InspectionFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ImageShare", + table: "ImageShare"); + + migrationBuilder.DropPrimaryKey( + name: "PK_IdentityUser", + table: "IdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_IdentityUser_CreateTime", + table: "IdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Hospital", + table: "Hospital"); + + migrationBuilder.DropIndex( + name: "IX_Hospital_CreateTime", + table: "Hospital"); + + migrationBuilder.DropPrimaryKey( + name: "PK_FrontAuditConfig", + table: "FrontAuditConfig"); + + migrationBuilder.DropIndex( + name: "IX_FrontAuditConfig_CreateTime", + table: "FrontAuditConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExploreRecommend", + table: "ExploreRecommend"); + + migrationBuilder.DropIndex( + name: "IX_ExploreRecommend_CreateTime", + table: "ExploreRecommend"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExchangeRate", + table: "ExchangeRate"); + + migrationBuilder.DropIndex( + name: "IX_ExchangeRate_CreateTime", + table: "ExchangeRate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EventStoreRecord", + table: "EventStoreRecord"); + + migrationBuilder.DropIndex( + name: "IX_EventStoreRecord_CreateTime", + table: "EventStoreRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollReadingCriterion", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCriterion_CreateTime", + table: "EnrollReadingCriterion"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollReadingCategory", + table: "EnrollReadingCategory"); + + migrationBuilder.DropIndex( + name: "IX_EnrollReadingCategory_CreateTime", + table: "EnrollReadingCategory"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EnrollDetail", + table: "EnrollDetail"); + + migrationBuilder.DropIndex( + name: "IX_EnrollDetail_CreateTime", + table: "EnrollDetail"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Enroll", + table: "Enroll"); + + migrationBuilder.DropIndex( + name: "IX_Enroll_CreateTime", + table: "Enroll"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailReSendLog", + table: "EmailReSendLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailReSendLog_CreateTime", + table: "EmailReSendLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailRecipientLog", + table: "EmailRecipientLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailRecipientLog_CreateTime", + table: "EmailRecipientLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailNoticeUserType", + table: "EmailNoticeUserType"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailNoticeConfig", + table: "EmailNoticeConfig"); + + migrationBuilder.DropIndex( + name: "IX_EmailNoticeConfig_CreateTime", + table: "EmailNoticeConfig"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailLog", + table: "EmailLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailLog_CreateTime", + table: "EmailLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EmailAttachmentLog", + table: "EmailAttachmentLog"); + + migrationBuilder.DropIndex( + name: "IX_EmailAttachmentLog_CreateTime", + table: "EmailAttachmentLog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Education", + table: "Education"); + + migrationBuilder.DropIndex( + name: "IX_Education_CreateTime", + table: "Education"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorWorkload", + table: "DoctorWorkload"); + + migrationBuilder.DropIndex( + name: "IX_DoctorWorkload_CreateTime", + table: "DoctorWorkload"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorSummarize", + table: "DoctorSummarize"); + + migrationBuilder.DropIndex( + name: "IX_DoctorSummarize_CreateTime", + table: "DoctorSummarize"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorPayInformation", + table: "DoctorPayInformation"); + + migrationBuilder.DropIndex( + name: "IX_DoctorPayInformation_CreateTime", + table: "DoctorPayInformation"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorDictionary", + table: "DoctorDictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DoctorCriterionFile", + table: "DoctorCriterionFile"); + + migrationBuilder.DropIndex( + name: "IX_DoctorCriterionFile_CreateTime", + table: "DoctorCriterionFile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Doctor", + table: "Doctor"); + + migrationBuilder.DropIndex( + name: "IX_Doctor_CreateTime", + table: "Doctor"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Dictionary", + table: "Dictionary"); + + migrationBuilder.DropIndex( + name: "IX_Dictionary_CreateTime", + table: "Dictionary"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomStudy", + table: "DicomStudy"); + + migrationBuilder.DropIndex( + name: "IX_DicomStudy_CreateTime", + table: "DicomStudy"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomSeries", + table: "DicomSeries"); + + migrationBuilder.DropIndex( + name: "IX_DicomSeries_CreateTime", + table: "DicomSeries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DicomInstance", + table: "DicomInstance"); + + migrationBuilder.DropIndex( + name: "IX_DicomInstance_CreateTime", + table: "DicomInstance"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DataInspection", + table: "DataInspection"); + + migrationBuilder.DropIndex( + name: "IX_DataInspection_CreateTime", + table: "DataInspection"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CROCompany", + table: "CROCompany"); + + migrationBuilder.DropIndex( + name: "IX_CROCompany_CreateTime", + table: "CROCompany"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionNidusTrial", + table: "CriterionNidusTrial"); + + migrationBuilder.DropIndex( + name: "IX_CriterionNidusTrial_CreateTime", + table: "CriterionNidusTrial"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionNidusSystem", + table: "CriterionNidusSystem"); + + migrationBuilder.DropIndex( + name: "IX_CriterionNidusSystem_CreateTime", + table: "CriterionNidusSystem"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CriterionKeyFileRead", + table: "CriterionKeyFileRead"); + + migrationBuilder.DropIndex( + name: "IX_CriterionKeyFileRead_CreateTime", + table: "CriterionKeyFileRead"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CommonDocument", + table: "CommonDocument"); + + migrationBuilder.DropIndex( + name: "IX_CommonDocument_CreateTime", + table: "CommonDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalTableAnswer", + table: "ClinicalTableAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalTableAnswer_CreateTime", + table: "ClinicalTableAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalQuestionAnswer", + table: "ClinicalQuestionAnswer"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalQuestionAnswer_CreateTime", + table: "ClinicalQuestionAnswer"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalForm", + table: "ClinicalForm"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalForm_CreateTime", + table: "ClinicalForm"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalDataTrialSet", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataTrialSet_CreateTime", + table: "ClinicalDataTrialSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalDataSystemSet", + table: "ClinicalDataSystemSet"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalDataSystemSet_CreateTime", + table: "ClinicalDataSystemSet"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ClinicalAnswerRowInfo", + table: "ClinicalAnswerRowInfo"); + + migrationBuilder.DropIndex( + name: "IX_ClinicalAnswerRowInfo_CreateTime", + table: "ClinicalAnswerRowInfo"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CheckChallengeDialog", + table: "CheckChallengeDialog"); + + migrationBuilder.DropIndex( + name: "IX_CheckChallengeDialog_CreateTime", + table: "CheckChallengeDialog"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecordPermission", + table: "AuditRecordPermission"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordPermission_CreateTime", + table: "AuditRecordPermission"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecordIdentityUser", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecordIdentityUser_CreateTime", + table: "AuditRecordIdentityUser"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditRecord", + table: "AuditRecord"); + + migrationBuilder.DropIndex( + name: "IX_AuditRecord_CreateTime", + table: "AuditRecord"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditDocumentClosure", + table: "AuditDocumentClosure"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AuditDocument", + table: "AuditDocument"); + + migrationBuilder.DropIndex( + name: "IX_AuditDocument_CreateTime", + table: "AuditDocument"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Attachment", + table: "Attachment"); + + migrationBuilder.DropIndex( + name: "IX_Attachment_CreateTime", + table: "Attachment"); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "IdentityUser", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(400)", + oldMaxLength: 400, + oldCollation: "Chinese_PRC_CS_AS"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VolumeReward", + table: "VolumeReward", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitTaskReReading", + table: "VisitTaskReReading", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitTask", + table: "VisitTask", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitStage", + table: "VisitStage", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitPlanInfluenceStudy", + table: "VisitPlanInfluenceStudy", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VisitPlanInfluenceStat", + table: "VisitPlanInfluenceStat", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_VerificationCode", + table: "VerificationCode", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Vacation", + table: "Vacation", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserWLTemplate", + table: "UserWLTemplate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserTypeMenu", + table: "UserTypeMenu", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserTypeGroup", + table: "UserTypeGroup", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserType", + table: "UserType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserPassWordLog", + table: "UserPassWordLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserLog", + table: "UserLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserFeedBack", + table: "UserFeedBack", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserAgreement", + table: "UserAgreement", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_User", + table: "User", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1BM", + table: "TumorAssessment_RECIST1Point1BM", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_RECIST1Point1", + table: "TumorAssessment_RECIST1Point1", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TumorAssessment_IRECIST1Point1", + table: "TumorAssessment_IRECIST1Point1", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialVirtualSiteCodeUpdate", + table: "TrialVirtualSiteCodeUpdate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialUser", + table: "TrialUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialTrianingRecord", + table: "TrialTrianingRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialStatus", + table: "TrialStatus", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialStateChange", + table: "TrialStateChange", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteUserSurvey", + table: "TrialSiteUserSurvey", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteUser", + table: "TrialSiteUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteSurvey", + table: "TrialSiteSurvey", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteEquipmentSurvey", + table: "TrialSiteEquipmentSurvey", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSiteDicomAE", + table: "TrialSiteDicomAE", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSite", + table: "TrialSite", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialSign", + table: "TrialSign", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialRevenuesPriceVerification", + table: "TrialRevenuesPriceVerification", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialRevenuesPrice", + table: "TrialRevenuesPrice", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialQCQuestionAnswer", + table: "TrialQCQuestionAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialQCQuestion", + table: "TrialQCQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialPaymentPrice", + table: "TrialPaymentPrice", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialNormalRecord", + table: "TrialNormalRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialImageDownload", + table: "TrialImageDownload", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialIdentityUser", + table: "TrialIdentityUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialHistoryRecordFile", + table: "TrialHistoryRecordFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFinalRecord", + table: "TrialFinalRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFileType", + table: "TrialFileType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialFile", + table: "TrialFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExternalUser", + table: "TrialExternalUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExperienceCriteria", + table: "TrialExperienceCriteria", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialExperience", + table: "TrialExperience", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailNoticeUser", + table: "TrialEmailNoticeUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailNoticeConfig", + table: "TrialEmailNoticeConfig", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialEmailBlackUser", + table: "TrialEmailBlackUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocumentAttachment", + table: "TrialDocumentAttachment", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocument", + table: "TrialDocument", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocNeedConfirmedUserType", + table: "TrialDocNeedConfirmedUserType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDocConfirmedIdentityUser", + table: "TrialDocConfirmedIdentityUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDictionary", + table: "TrialDictionary", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialDicomAE", + table: "TrialDicomAE", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionKeyFile", + table: "TrialCriterionKeyFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionDictionaryCode", + table: "TrialCriterionDictionaryCode", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialCriterionAdditionalAssessmentType", + table: "TrialCriterionAdditionalAssessmentType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalTableQuestion", + table: "TrialClinicalTableQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalQuestion", + table: "TrialClinicalQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialClinicalDataSetCriterion", + table: "TrialClinicalDataSetCriterion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialBodyPart", + table: "TrialBodyPart", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TrialAuditShow", + table: "TrialAuditShow", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Trial", + table: "Trial", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TestLength", + table: "TestLength", + column: "Id"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_TaskStudy_Id", + table: "TaskStudy", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskStudy", + table: "TaskStudy", + column: "SeqId"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_TaskSeries_Id", + table: "TaskSeries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskSeries", + table: "TaskSeries", + column: "SeqId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskMedicalReviewRule", + table: "TaskMedicalReviewRule", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskMedicalReview", + table: "TaskMedicalReview", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskInstance", + table: "TaskInstance", + column: "SeqId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskInfluence", + table: "TaskInfluence", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskConsistentRule", + table: "TaskConsistentRule", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TaskAllocationRule", + table: "TaskAllocationRule", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNoticeUserType", + table: "SystemNoticeUserType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNoticeUserRead", + table: "SystemNoticeUserRead", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemNotice", + table: "SystemNotice", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocumentAttachment", + table: "SystemDocumentAttachment", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocument", + table: "SystemDocument", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocNeedConfirmedUserType", + table: "SystemDocNeedConfirmedUserType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemDocConfirmedIdentityUser", + table: "SystemDocConfirmedIdentityUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemCriterionKeyFile", + table: "SystemCriterionKeyFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemCriterionDictionaryCode", + table: "SystemCriterionDictionaryCode", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemClinicalTableQuestion", + table: "SystemClinicalTableQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemClinicalQuestion", + table: "SystemClinicalQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemBasicData", + table: "SystemBasicData", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SystemAnonymization", + table: "SystemAnonymization", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SysFileType", + table: "SysFileType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectVisitImageBackRecord", + table: "SubjectVisitImageBackRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectVisit", + table: "SubjectVisit", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectUser", + table: "SubjectUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitStudyFilter", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluationVisitFilter", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCriteriaEvaluation", + table: "SubjectCriteriaEvaluation", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectCanceDoctor", + table: "SubjectCanceDoctor", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SubjectAdditionalEvaluationResult", + table: "SubjectAdditionalEvaluationResult", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Subject", + table: "Subject", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_StudyMonitor", + table: "StudyMonitor", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Sponsor", + table: "Sponsor", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Site", + table: "Site", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ShortcutKey", + table: "ShortcutKey", + column: "Id"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_SCPStudy_Id", + table: "SCPStudy", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPStudy", + table: "SCPStudy", + column: "SeqId"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_SCPSeries_Id", + table: "SCPSeries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPSeries", + table: "SCPSeries", + column: "SeqId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPPatient", + table: "SCPPatient", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPInstance", + table: "SCPInstance", + column: "SeqId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SCPImageUpload", + table: "SCPImageUpload", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ResearchPublication", + table: "ResearchPublication", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadModuleCriterionFrom", + table: "ReadModuleCriterionFrom", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadModule", + table: "ReadModule", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTrialCriterionDictionary", + table: "ReadingTrialCriterionDictionary", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskRelation", + table: "ReadingTaskRelation", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskQuestionMark", + table: "ReadingTaskQuestionMark", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTaskQuestionAnswer", + table: "ReadingTaskQuestionAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionTrial", + table: "ReadingTableQuestionTrial", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionSystem", + table: "ReadingTableQuestionSystem", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableQuestionAnswer", + table: "ReadingTableQuestionAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingTableAnswerRowInfo", + table: "ReadingTableAnswerRowInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingSystemCriterionDictionary", + table: "ReadingSystemCriterionDictionary", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionTrial", + table: "ReadingQuestionTrial", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionSystem", + table: "ReadingQuestionSystem", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionCriterionTrial", + table: "ReadingQuestionCriterionTrial", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingQuestionCriterionSystem", + table: "ReadingQuestionCriterionSystem", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodSite", + table: "ReadingPeriodSite", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodSet", + table: "ReadingPeriodSet", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingPeriodPlan", + table: "ReadingPeriodPlan", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingOncologyTaskInfo", + table: "ReadingOncologyTaskInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingNoneDicomMarkBinding", + table: "ReadingNoneDicomMarkBinding", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingNoneDicomMark", + table: "ReadingNoneDicomMark", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineTrialQuestion", + table: "ReadingMedicineTrialQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineSystemQuestion", + table: "ReadingMedicineSystemQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicineQuestionAnswer", + table: "ReadingMedicineQuestionAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingMedicalReviewDialog", + table: "ReadingMedicalReviewDialog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingJudgeInfo", + table: "ReadingJudgeInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingImportFile", + table: "ReadingImportFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingGlobalTaskInfo", + table: "ReadingGlobalTaskInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingCustomTag", + table: "ReadingCustomTag", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingCriterionPage", + table: "ReadingCriterionPage", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingConsistentClinicalDataPDF", + table: "ReadingConsistentClinicalDataPDF", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingConsistentClinicalData", + table: "ReadingConsistentClinicalData", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingClinicalDataPDF", + table: "ReadingClinicalDataPDF", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ReadingClinicalData", + table: "ReadingClinicalData", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_RankPrice", + table: "RankPrice", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCQuestion", + table: "QCQuestion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCChallengeDialog", + table: "QCChallengeDialog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_QCChallenge", + table: "QCChallenge", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PublishLog", + table: "PublishLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousSurgery", + table: "PreviousSurgery", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousPDF", + table: "PreviousPDF", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousOther", + table: "PreviousOther", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PreviousHistory", + table: "PreviousHistory", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Postgraduate", + table: "Postgraduate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PaymentDetail", + table: "PaymentDetail", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PaymentAdjustment", + table: "PaymentAdjustment", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Payment", + table: "Payment", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_OrganTrialInfo", + table: "OrganTrialInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_OrganInfo", + table: "OrganInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_NoneDicomStudyFile", + table: "NoneDicomStudyFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_NoneDicomStudy", + table: "NoneDicomStudy", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Menu", + table: "Menu", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Internationalization", + table: "Internationalization", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_InspectionFile", + table: "InspectionFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ImageShare", + table: "ImageShare", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_IdentityUser", + table: "IdentityUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Hospital", + table: "Hospital", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_FrontAuditConfig", + table: "FrontAuditConfig", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExploreRecommend", + table: "ExploreRecommend", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExchangeRate", + table: "ExchangeRate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EventStoreRecord", + table: "EventStoreRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollReadingCriterion", + table: "EnrollReadingCriterion", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollReadingCategory", + table: "EnrollReadingCategory", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EnrollDetail", + table: "EnrollDetail", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Enroll", + table: "Enroll", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailReSendLog", + table: "EmailReSendLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailRecipientLog", + table: "EmailRecipientLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailNoticeUserType", + table: "EmailNoticeUserType", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailNoticeConfig", + table: "EmailNoticeConfig", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailLog", + table: "EmailLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EmailAttachmentLog", + table: "EmailAttachmentLog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Education", + table: "Education", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorWorkload", + table: "DoctorWorkload", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorSummarize", + table: "DoctorSummarize", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorPayInformation", + table: "DoctorPayInformation", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorDictionary", + table: "DoctorDictionary", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DoctorCriterionFile", + table: "DoctorCriterionFile", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Doctor", + table: "Doctor", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Dictionary", + table: "Dictionary", + column: "Id"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_DicomStudy_Id", + table: "DicomStudy", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomStudy", + table: "DicomStudy", + column: "SeqId"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_DicomSeries_Id", + table: "DicomSeries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomSeries", + table: "DicomSeries", + column: "SeqId"); + + migrationBuilder.AddUniqueConstraint( + name: "AK_DicomInstance_Id", + table: "DicomInstance", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DicomInstance", + table: "DicomInstance", + column: "SeqId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DataInspection", + table: "DataInspection", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CROCompany", + table: "CROCompany", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionNidusTrial", + table: "CriterionNidusTrial", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionNidusSystem", + table: "CriterionNidusSystem", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CriterionKeyFileRead", + table: "CriterionKeyFileRead", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CommonDocument", + table: "CommonDocument", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalTableAnswer", + table: "ClinicalTableAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalQuestionAnswer", + table: "ClinicalQuestionAnswer", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalForm", + table: "ClinicalForm", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalDataTrialSet", + table: "ClinicalDataTrialSet", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalDataSystemSet", + table: "ClinicalDataSystemSet", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ClinicalAnswerRowInfo", + table: "ClinicalAnswerRowInfo", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CheckChallengeDialog", + table: "CheckChallengeDialog", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecordPermission", + table: "AuditRecordPermission", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecordIdentityUser", + table: "AuditRecordIdentityUser", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditRecord", + table: "AuditRecord", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditDocumentClosure", + table: "AuditDocumentClosure", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AuditDocument", + table: "AuditDocument", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Attachment", + table: "Attachment", + column: "Id"); + + migrationBuilder.CreateIndex( + name: "IX_VolumeReward_CreateUserId", + table: "VolumeReward", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_CreateUserId", + table: "VisitTaskReReading", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_NewReReadingTaskId", + table: "VisitTaskReReading", + column: "NewReReadingTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_OriginalReReadingTaskId", + table: "VisitTaskReReading", + column: "OriginalReReadingTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_RequestReReadingConfirmUserId", + table: "VisitTaskReReading", + column: "RequestReReadingConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_RequestReReadingUserId", + table: "VisitTaskReReading", + column: "RequestReReadingUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_RootReReadingTaskId", + table: "VisitTaskReReading", + column: "RootReReadingTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTaskReReading_TrialId", + table: "VisitTaskReReading", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_CreateUserId", + table: "VisitTask", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_DoctorUserId", + table: "VisitTask", + column: "DoctorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_JudgeResultTaskId", + table: "VisitTask", + column: "JudgeResultTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_JudgeVisitTaskId", + table: "VisitTask", + column: "JudgeVisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_SouceReadModuleId", + table: "VisitTask", + column: "SouceReadModuleId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_SourceSubjectVisitId", + table: "VisitTask", + column: "SourceSubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_SubjectId", + table: "VisitTask", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_TrialId", + table: "VisitTask", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitTask_TrialReadingCriterionId", + table: "VisitTask", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitStage_CreateUserId", + table: "VisitStage", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitStage_TrialId", + table: "VisitStage", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStudy_CreateUserId", + table: "VisitPlanInfluenceStudy", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStudy_SubjectVisitId", + table: "VisitPlanInfluenceStudy", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStudy_VisitPlanInfluenceStatId", + table: "VisitPlanInfluenceStudy", + column: "VisitPlanInfluenceStatId"); + + migrationBuilder.CreateIndex( + name: "IX_VisitPlanInfluenceStat_CreateUserId", + table: "VisitPlanInfluenceStat", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_VerificationCode_CreateUserId", + table: "VerificationCode", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Vacation_CreateUserId", + table: "Vacation", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserWLTemplate_CreateUserId", + table: "UserWLTemplate", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserTypeMenu_MenuId", + table: "UserTypeMenu", + column: "MenuId"); + + migrationBuilder.CreateIndex( + name: "IX_UserTypeMenu_UserTypeId", + table: "UserTypeMenu", + column: "UserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_UserTypeGroup_DictionaryId", + table: "UserTypeGroup", + column: "DictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_UserTypeGroup_UserTypeId", + table: "UserTypeGroup", + column: "UserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_UserPassWordLog_CreateUserId", + table: "UserPassWordLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_ActionIdentityUserId", + table: "UserLog", + column: "ActionIdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_CreateUserId", + table: "UserLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_TargetIdentityUserId", + table: "UserLog", + column: "TargetIdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_CreateUserId", + table: "UserFeedBack", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_SubjectId", + table: "UserFeedBack", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_SubjectVisitId", + table: "UserFeedBack", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_TrialId", + table: "UserFeedBack", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_TrialSiteId", + table: "UserFeedBack", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_UserFeedBack_VisitTaskId", + table: "UserFeedBack", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_UserAgreement_CreateUserId", + table: "UserAgreement", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_User_CreateUserId", + table: "User", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_User_DoctorId", + table: "User", + column: "DoctorId", + unique: true, + filter: "[DoctorId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_User_IdentityUserId", + table: "User", + column: "IdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_User_UserTypeId", + table: "User", + column: "UserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialVirtualSiteCodeUpdate_CreateUserId", + table: "TrialVirtualSiteCodeUpdate", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_CreateUserId", + table: "TrialUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_TrialId", + table: "TrialUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_TrialUserId", + table: "TrialUser", + column: "TrialUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_UserId", + table: "TrialUser", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialTrianingRecord_CreateUserId", + table: "TrialTrianingRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialTrianingRecord_HistoryFileRecordId", + table: "TrialTrianingRecord", + column: "HistoryFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialTrianingRecord_TrialFileRecordId", + table: "TrialTrianingRecord", + column: "TrialFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialStatus_CreateUserId", + table: "TrialStatus", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialStatus_TrialId", + table: "TrialStatus", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialStateChange_CreateUserId", + table: "TrialStateChange", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialStateChange_TrialId", + table: "TrialStateChange", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUserSurvey_CreateUserId", + table: "TrialSiteUserSurvey", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUserSurvey_TrialSiteSurveyId", + table: "TrialSiteUserSurvey", + column: "TrialSiteSurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUserSurvey_UserTypeId", + table: "TrialSiteUserSurvey", + column: "UserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUser_CreateUserId", + table: "TrialSiteUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUser_TrialId", + table: "TrialSiteUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUser_TrialSiteId", + table: "TrialSiteUser", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteUser_UserId", + table: "TrialSiteUser", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_CreateUserId", + table: "TrialSiteSurvey", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_PreliminaryUserId", + table: "TrialSiteSurvey", + column: "PreliminaryUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_ReviewerUserId", + table: "TrialSiteSurvey", + column: "ReviewerUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_TrialId", + table: "TrialSiteSurvey", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteSurvey_TrialSiteId", + table: "TrialSiteSurvey", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteEquipmentSurvey_CreateUserId", + table: "TrialSiteEquipmentSurvey", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteEquipmentSurvey_EquipmentTypeId", + table: "TrialSiteEquipmentSurvey", + column: "EquipmentTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteEquipmentSurvey_TrialSiteSurveyId", + table: "TrialSiteEquipmentSurvey", + column: "TrialSiteSurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteDicomAE_CreateUserId", + table: "TrialSiteDicomAE", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSiteDicomAE_TrialSiteId", + table: "TrialSiteDicomAE", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSite_CreateUserId", + table: "TrialSite", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSite_SiteId", + table: "TrialSite", + column: "SiteId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSite_TrialId", + table: "TrialSite", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialSign_CreateUserId", + table: "TrialSign", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialRevenuesPrice_CreateUserId", + table: "TrialRevenuesPrice", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestionAnswer_CreateUserId", + table: "TrialQCQuestionAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestionAnswer_SubjectVisitId", + table: "TrialQCQuestionAnswer", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestionAnswer_TrialQCQuestionConfigureId", + table: "TrialQCQuestionAnswer", + column: "TrialQCQuestionConfigureId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestion_CreateUserId", + table: "TrialQCQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestion_ParentId", + table: "TrialQCQuestion", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialQCQuestion_TrialId", + table: "TrialQCQuestion", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialPaymentPrice_CreateUserId", + table: "TrialPaymentPrice", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialPaymentPrice_TrialId", + table: "TrialPaymentPrice", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialNormalRecord_CreateUserId", + table: "TrialNormalRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialNormalRecord_HistoryFileRecordId", + table: "TrialNormalRecord", + column: "HistoryFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialNormalRecord_TrialFileRecordId", + table: "TrialNormalRecord", + column: "TrialFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialImageDownload_CreateUserId", + table: "TrialImageDownload", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialImageDownload_SubjectId", + table: "TrialImageDownload", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialImageDownload_TrialId", + table: "TrialImageDownload", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_CreateUserId", + table: "TrialIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_IdentityUserId", + table: "TrialIdentityUser", + column: "IdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_TrialId", + table: "TrialIdentityUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialHistoryRecordFile_CreateUserId", + table: "TrialHistoryRecordFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialHistoryRecordFile_TrialFileTypeId", + table: "TrialHistoryRecordFile", + column: "TrialFileTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialHistoryRecordFile_TrialRecordId", + table: "TrialHistoryRecordFile", + column: "TrialRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_CreateUserId", + table: "TrialFinalRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_HistoryFileRecordId", + table: "TrialFinalRecord", + column: "HistoryFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_PDFFileRecordId", + table: "TrialFinalRecord", + column: "PDFFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_SignFileRecordId", + table: "TrialFinalRecord", + column: "SignFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFinalRecord_WordFileRecordId", + table: "TrialFinalRecord", + column: "WordFileRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFileType_CreateUserId", + table: "TrialFileType", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFile_CreateUserId", + table: "TrialFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialFile_TrialFileTypeId", + table: "TrialFile", + column: "TrialFileTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExternalUser_CreateUserId", + table: "TrialExternalUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExternalUser_TrialId", + table: "TrialExternalUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperienceCriteria_DoctorId", + table: "TrialExperienceCriteria", + column: "DoctorId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperienceCriteria_EvaluationCriteriaId", + table: "TrialExperienceCriteria", + column: "EvaluationCriteriaId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperienceCriteria_TrialExperienceId", + table: "TrialExperienceCriteria", + column: "TrialExperienceId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperience_CreateUserId", + table: "TrialExperience", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperience_PhaseId", + table: "TrialExperience", + column: "PhaseId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialExperience_TrialId", + table: "TrialExperience", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeUser_TrialEmailNoticeConfigId", + table: "TrialEmailNoticeUser", + column: "TrialEmailNoticeConfigId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeConfig_CreateUserId", + table: "TrialEmailNoticeConfig", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeConfig_SysEmailNoticeConfigId", + table: "TrialEmailNoticeConfig", + column: "SysEmailNoticeConfigId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeConfig_TrialId", + table: "TrialEmailNoticeConfig", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailNoticeConfig_TrialReadingCriterionId", + table: "TrialEmailNoticeConfig", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailBlackUser_TrialEmailNoticeConfigId", + table: "TrialEmailBlackUser", + column: "TrialEmailNoticeConfigId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialEmailBlackUser_UserId", + table: "TrialEmailBlackUser", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocumentAttachment_CreateUserId", + table: "TrialDocumentAttachment", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocumentAttachment_TrialDocumentId", + table: "TrialDocumentAttachment", + column: "TrialDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocument_CreateUserId", + table: "TrialDocument", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocument_FileTypeId", + table: "TrialDocument", + column: "FileTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocument_TrialId", + table: "TrialDocument", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocNeedConfirmedUserType_NeedConfirmUserTypeId", + table: "TrialDocNeedConfirmedUserType", + column: "NeedConfirmUserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocNeedConfirmedUserType_TrialDocumentId", + table: "TrialDocNeedConfirmedUserType", + column: "TrialDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_ConfirmUserId", + table: "TrialDocConfirmedIdentityUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_CreateUserId", + table: "TrialDocConfirmedIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_TrialDocumentId", + table: "TrialDocConfirmedIdentityUser", + column: "TrialDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDictionary_DictionaryId", + table: "TrialDictionary", + column: "DictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDictionary_TrialId", + table: "TrialDictionary", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDicomAE_CreateUserId", + table: "TrialDicomAE", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionKeyFile_CreateUserId", + table: "TrialCriterionKeyFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionKeyFile_TrialCriterionId", + table: "TrialCriterionKeyFile", + column: "TrialCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionDictionaryCode_CreateUserId", + table: "TrialCriterionDictionaryCode", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionDictionaryCode_TrialCriterionId", + table: "TrialCriterionDictionaryCode", + column: "TrialCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_CreateUserId", + table: "TrialCriterionAdditionalAssessmentType", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialCriterionAdditionalAssessmentType_TrialReadingCriterionId", + table: "TrialCriterionAdditionalAssessmentType", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalTableQuestion_CreateUserId", + table: "TrialClinicalTableQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalQuestion_CreateUserId", + table: "TrialClinicalQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalQuestion_GroupId", + table: "TrialClinicalQuestion", + column: "GroupId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalQuestion_TrialClinicalId", + table: "TrialClinicalQuestion", + column: "TrialClinicalId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalDataSetCriterion_CreateUserId", + table: "TrialClinicalDataSetCriterion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalDataSetCriterion_TrialClinicalDataSetId", + table: "TrialClinicalDataSetCriterion", + column: "TrialClinicalDataSetId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialClinicalDataSetCriterion_TrialReadingCriterionId", + table: "TrialClinicalDataSetCriterion", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialBodyPart_CreateUserId", + table: "TrialBodyPart", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialBodyPart_TrialId", + table: "TrialBodyPart", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialAuditShow_CreateUserId", + table: "TrialAuditShow", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_CreateUserId", + table: "Trial", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_CROId", + table: "Trial", + column: "CROId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_IndicationTypeId", + table: "Trial", + column: "IndicationTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_PhaseId", + table: "Trial", + column: "PhaseId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_QCQuestionConfirmedUserId", + table: "Trial", + column: "QCQuestionConfirmedUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_ReviewModeId", + table: "Trial", + column: "ReviewModeId"); + + migrationBuilder.CreateIndex( + name: "IX_Trial_SponsorId", + table: "Trial", + column: "SponsorId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskStudy_CreateUserId", + table: "TaskStudy", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskStudy_SubjectId", + table: "TaskStudy", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskStudy_SubjectVisitId", + table: "TaskStudy", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskStudy_VisitTaskId", + table: "TaskStudy", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskSeries_CreateUserId", + table: "TaskSeries", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskSeries_StudyId", + table: "TaskSeries", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskSeries_SubjectVisitId", + table: "TaskSeries", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReviewRule_CreateUserId", + table: "TaskMedicalReviewRule", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReviewRule_DoctorUserId", + table: "TaskMedicalReviewRule", + column: "DoctorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_CreateUserId", + table: "TaskMedicalReview", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_LatestReplyUserId", + table: "TaskMedicalReview", + column: "LatestReplyUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_MedicalManagerUserId", + table: "TaskMedicalReview", + column: "MedicalManagerUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_TrialId", + table: "TaskMedicalReview", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskMedicalReview_VisitTaskId", + table: "TaskMedicalReview", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInstance_CreateUserId", + table: "TaskInstance", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInstance_SeriesId", + table: "TaskInstance", + column: "SeriesId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInstance_StudyId", + table: "TaskInstance", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInstance_SubjectVisitId", + table: "TaskInstance", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInfluence_CreateUserId", + table: "TaskInfluence", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInfluence_InfluenceTaskId", + table: "TaskInfluence", + column: "InfluenceTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskInfluence_OriginalTaskId", + table: "TaskInfluence", + column: "OriginalTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskConsistentRule_CreateUserId", + table: "TaskConsistentRule", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskConsistentRule_TrialId", + table: "TaskConsistentRule", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskConsistentRule_TrialReadingCriterionId", + table: "TaskConsistentRule", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskAllocationRule_CreateUserId", + table: "TaskAllocationRule", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskAllocationRule_DoctorUserId", + table: "TaskAllocationRule", + column: "DoctorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TaskAllocationRule_EnrollId", + table: "TaskAllocationRule", + column: "EnrollId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_TaskAllocationRule_TrialId", + table: "TaskAllocationRule", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserType_CreateUserId", + table: "SystemNoticeUserType", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserType_SystemNoticeId", + table: "SystemNoticeUserType", + column: "SystemNoticeId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserType_UserTypeId", + table: "SystemNoticeUserType", + column: "UserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserRead_CreateUserId", + table: "SystemNoticeUserRead", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNoticeUserRead_SystemNoticeId", + table: "SystemNoticeUserRead", + column: "SystemNoticeId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNotice_CreateUserId", + table: "SystemNotice", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemNotice_PublishedUserId", + table: "SystemNotice", + column: "PublishedUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocumentAttachment_CreateUserId", + table: "SystemDocumentAttachment", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocumentAttachment_SystemDocumentId", + table: "SystemDocumentAttachment", + column: "SystemDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocument_CreateUserId", + table: "SystemDocument", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocument_FileTypeId", + table: "SystemDocument", + column: "FileTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocNeedConfirmedUserType_NeedConfirmUserTypeId", + table: "SystemDocNeedConfirmedUserType", + column: "NeedConfirmUserTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocNeedConfirmedUserType_SystemDocumentId", + table: "SystemDocNeedConfirmedUserType", + column: "SystemDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_ConfirmUserId", + table: "SystemDocConfirmedIdentityUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_CreateUserId", + table: "SystemDocConfirmedIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_SystemDocumentId", + table: "SystemDocConfirmedIdentityUser", + column: "SystemDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemCriterionKeyFile_CreateUserId", + table: "SystemCriterionKeyFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemCriterionDictionaryCode_CreateUserId", + table: "SystemCriterionDictionaryCode", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemClinicalTableQuestion_CreateUserId", + table: "SystemClinicalTableQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemClinicalQuestion_CreateUserId", + table: "SystemClinicalQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemClinicalQuestion_GroupId", + table: "SystemClinicalQuestion", + column: "GroupId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemBasicData_CreateUserId", + table: "SystemBasicData", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemBasicData_ParentId", + table: "SystemBasicData", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemAnonymization_CreateUserId", + table: "SystemAnonymization", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SysFileType_CreateUserId", + table: "SysFileType", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisitImageBackRecord_CreateUserId", + table: "SubjectVisitImageBackRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisitImageBackRecord_SubjectVisitId", + table: "SubjectVisitImageBackRecord", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_CreateUserId", + table: "SubjectVisit", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_CurrentActionUserId", + table: "SubjectVisit", + column: "CurrentActionUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_ForwardUserId", + table: "SubjectVisit", + column: "ForwardUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_OutPlanPreviousVisitId", + table: "SubjectVisit", + column: "OutPlanPreviousVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_PreliminaryAuditUserId", + table: "SubjectVisit", + column: "PreliminaryAuditUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_ReviewAuditUserId", + table: "SubjectVisit", + column: "ReviewAuditUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_SubjectId", + table: "SubjectVisit", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_SubmitUserId", + table: "SubjectVisit", + column: "SubmitUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_TrialId", + table: "SubjectVisit", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectVisit_TrialSiteId", + table: "SubjectVisit", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_CreateUserId", + table: "SubjectUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_DoctorUserId", + table: "SubjectUser", + column: "DoctorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_ReplacedSubjectUserId", + table: "SubjectUser", + column: "ReplacedSubjectUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_SubjectId", + table: "SubjectUser", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectUser_TrialId", + table: "SubjectUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_CreateUserId", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_SeriesId", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "SeriesId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_StudyId", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_SubjectVisitId", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitStudyFilter_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluationVisitStudyFilter", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_CreateUserId", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_SubjectId", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_SubjectVisitId", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluationVisitFilter_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluationVisitFilter", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluation_CreateUserId", + table: "SubjectCriteriaEvaluation", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluation_SubjectId", + table: "SubjectCriteriaEvaluation", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCriteriaEvaluation_TrialReadingCriterionId", + table: "SubjectCriteriaEvaluation", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCanceDoctor_CreateUserId", + table: "SubjectCanceDoctor", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectCanceDoctor_SubjectId", + table: "SubjectCanceDoctor", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectAdditionalEvaluationResult_CreateUserId", + table: "SubjectAdditionalEvaluationResult", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectAdditionalEvaluationResult_SubjectId", + table: "SubjectAdditionalEvaluationResult", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SubjectAdditionalEvaluationResult_TrialReadingQuestionId", + table: "SubjectAdditionalEvaluationResult", + column: "TrialReadingQuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Subject_CreateUserId", + table: "Subject", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Subject_FinalSubjectVisitId", + table: "Subject", + column: "FinalSubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_Subject_LatestSubjectVisitId", + table: "Subject", + column: "LatestSubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_Subject_TrialId", + table: "Subject", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_Subject_TrialSiteId", + table: "Subject", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_CreateUserId", + table: "StudyMonitor", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_StudyId", + table: "StudyMonitor", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_SubjectId", + table: "StudyMonitor", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_SubjectVisitId", + table: "StudyMonitor", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_StudyMonitor_TrialId", + table: "StudyMonitor", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_Sponsor_CreateUserId", + table: "Sponsor", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Site_CreateUserId", + table: "Site", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Site_HospitalId", + table: "Site", + column: "HospitalId"); + + migrationBuilder.CreateIndex( + name: "IX_ShortcutKey_CreateUserId", + table: "ShortcutKey", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_CreateUserId", + table: "SCPStudy", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_PatientId", + table: "SCPStudy", + column: "PatientId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_SubjectVisitId", + table: "SCPStudy", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_TrialId", + table: "SCPStudy", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPStudy_TrialSiteId", + table: "SCPStudy", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPSeries_CreateUserId", + table: "SCPSeries", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPSeries_StudyId", + table: "SCPSeries", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPPatient_CreateUserId", + table: "SCPPatient", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPPatient_SubjectId", + table: "SCPPatient", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPPatient_TrialId", + table: "SCPPatient", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPPatient_TrialSiteId", + table: "SCPPatient", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPInstance_CreateUserId", + table: "SCPInstance", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPInstance_SeriesId", + table: "SCPInstance", + column: "SeriesId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPInstance_StudyId", + table: "SCPInstance", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPImageUpload_CreateUserId", + table: "SCPImageUpload", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPImageUpload_TrialId", + table: "SCPImageUpload", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_SCPImageUpload_TrialSiteId", + table: "SCPImageUpload", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_ResearchPublication_CreateUserId", + table: "ResearchPublication", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModuleCriterionFrom_ClinicalFormId", + table: "ReadModuleCriterionFrom", + column: "ClinicalFormId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModuleCriterionFrom_CreateUserId", + table: "ReadModuleCriterionFrom", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModuleCriterionFrom_ReadModuleId", + table: "ReadModuleCriterionFrom", + column: "ReadModuleId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_CreateUserId", + table: "ReadModule", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_ReadingPeriodSetId", + table: "ReadModule", + column: "ReadingPeriodSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_SubjectId", + table: "ReadModule", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_SubjectVisitId", + table: "ReadModule", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_TrialId", + table: "ReadModule", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadModule_TrialReadingCriterionId", + table: "ReadModule", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTrialCriterionDictionary_CreateUserId", + table: "ReadingTrialCriterionDictionary", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTrialCriterionDictionary_CriterionId", + table: "ReadingTrialCriterionDictionary", + column: "CriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTrialCriterionDictionary_DictionaryId", + table: "ReadingTrialCriterionDictionary", + column: "DictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskRelation_CreateUserId", + table: "ReadingTaskRelation", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskRelation_TaskId", + table: "ReadingTaskRelation", + column: "TaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionMark_CreateUserId", + table: "ReadingTaskQuestionMark", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionMark_QuestionId", + table: "ReadingTaskQuestionMark", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionMark_VisitTaskId", + table: "ReadingTaskQuestionMark", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionAnswer_CreateUserId", + table: "ReadingTaskQuestionAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionAnswer_ReadingQuestionTrialId", + table: "ReadingTaskQuestionAnswer", + column: "ReadingQuestionTrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionAnswer_SubjectId", + table: "ReadingTaskQuestionAnswer", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTaskQuestionAnswer_VisitTaskId", + table: "ReadingTaskQuestionAnswer", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionTrial_CreateUserId", + table: "ReadingTableQuestionTrial", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionTrial_DependParentId", + table: "ReadingTableQuestionTrial", + column: "DependParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionTrial_ReadingQuestionId", + table: "ReadingTableQuestionTrial", + column: "ReadingQuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionSystem_CreateUserId", + table: "ReadingTableQuestionSystem", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionSystem_DependParentId", + table: "ReadingTableQuestionSystem", + column: "DependParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionSystem_ReadingQuestionId", + table: "ReadingTableQuestionSystem", + column: "ReadingQuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_CreateUserId", + table: "ReadingTableQuestionAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_QuestionId", + table: "ReadingTableQuestionAnswer", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_RowId", + table: "ReadingTableQuestionAnswer", + column: "RowId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_TableQuestionId", + table: "ReadingTableQuestionAnswer", + column: "TableQuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableQuestionAnswer_VisitTaskId", + table: "ReadingTableQuestionAnswer", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_CreateUserId", + table: "ReadingTableAnswerRowInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_FristAddTaskId", + table: "ReadingTableAnswerRowInfo", + column: "FristAddTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_InstanceId", + table: "ReadingTableAnswerRowInfo", + column: "InstanceId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_MergeRowId", + table: "ReadingTableAnswerRowInfo", + column: "MergeRowId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_OrganInfoId", + table: "ReadingTableAnswerRowInfo", + column: "OrganInfoId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_QuestionId", + table: "ReadingTableAnswerRowInfo", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_SeriesId", + table: "ReadingTableAnswerRowInfo", + column: "SeriesId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_SplitRowId", + table: "ReadingTableAnswerRowInfo", + column: "SplitRowId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_StudyId", + table: "ReadingTableAnswerRowInfo", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingTableAnswerRowInfo_VisitTaskId", + table: "ReadingTableAnswerRowInfo", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingSystemCriterionDictionary_CreateUserId", + table: "ReadingSystemCriterionDictionary", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingSystemCriterionDictionary_DictionaryId", + table: "ReadingSystemCriterionDictionary", + column: "DictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_CreateUserId", + table: "ReadingQuestionTrial", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_GroupId", + table: "ReadingQuestionTrial", + column: "GroupId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_ParentId", + table: "ReadingQuestionTrial", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_ReadingCriterionPageId", + table: "ReadingQuestionTrial", + column: "ReadingCriterionPageId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_ReadingQuestionCriterionTrialId", + table: "ReadingQuestionTrial", + column: "ReadingQuestionCriterionTrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionTrial_RelevanceId", + table: "ReadingQuestionTrial", + column: "RelevanceId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_CreateUserId", + table: "ReadingQuestionSystem", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_GroupId", + table: "ReadingQuestionSystem", + column: "GroupId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_ParentId", + table: "ReadingQuestionSystem", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_ReadingQuestionCriterionSystemId", + table: "ReadingQuestionSystem", + column: "ReadingQuestionCriterionSystemId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionSystem_RelevanceId", + table: "ReadingQuestionSystem", + column: "RelevanceId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionCriterionTrial_CreateUserId", + table: "ReadingQuestionCriterionTrial", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionCriterionTrial_TrialId", + table: "ReadingQuestionCriterionTrial", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingQuestionCriterionSystem_CreateUserId", + table: "ReadingQuestionCriterionSystem", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSite_CreateUserId", + table: "ReadingPeriodSite", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSite_ReadingPeriodSetId", + table: "ReadingPeriodSite", + column: "ReadingPeriodSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSite_TrialSiteId", + table: "ReadingPeriodSite", + column: "TrialSiteId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSet_CreateUserId", + table: "ReadingPeriodSet", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodSet_VisitStageId", + table: "ReadingPeriodSet", + column: "VisitStageId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodPlan_CreateUserId", + table: "ReadingPeriodPlan", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodPlan_ReadingPeriodSetId", + table: "ReadingPeriodPlan", + column: "ReadingPeriodSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingPeriodPlan_SubjectVisitId", + table: "ReadingPeriodPlan", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingOncologyTaskInfo_CreateUserId", + table: "ReadingOncologyTaskInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingOncologyTaskInfo_OncologyTaskId", + table: "ReadingOncologyTaskInfo", + column: "OncologyTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingOncologyTaskInfo_VisitTaskId", + table: "ReadingOncologyTaskInfo", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMarkBinding_CreateUserId", + table: "ReadingNoneDicomMarkBinding", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMarkBinding_NoneDicomMarkId", + table: "ReadingNoneDicomMarkBinding", + column: "NoneDicomMarkId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMark_CreateUserId", + table: "ReadingNoneDicomMark", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMark_StudyId", + table: "ReadingNoneDicomMark", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingNoneDicomMark_VisitTaskId", + table: "ReadingNoneDicomMark", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineTrialQuestion_CreateUserId", + table: "ReadingMedicineTrialQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineTrialQuestion_ParentId", + table: "ReadingMedicineTrialQuestion", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineSystemQuestion_CreateUserId", + table: "ReadingMedicineSystemQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineSystemQuestion_ParentId", + table: "ReadingMedicineSystemQuestion", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineQuestionAnswer_CreateUserId", + table: "ReadingMedicineQuestionAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicineQuestionAnswer_TaskMedicalReviewId", + table: "ReadingMedicineQuestionAnswer", + column: "TaskMedicalReviewId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicalReviewDialog_CreateUserId", + table: "ReadingMedicalReviewDialog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingMedicalReviewDialog_TaskMedicalReviewId", + table: "ReadingMedicalReviewDialog", + column: "TaskMedicalReviewId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingJudgeInfo_CreateUserId", + table: "ReadingJudgeInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingImportFile_CreateUserId", + table: "ReadingImportFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingGlobalTaskInfo_CreateUserId", + table: "ReadingGlobalTaskInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingGlobalTaskInfo_GlobalTaskId", + table: "ReadingGlobalTaskInfo", + column: "GlobalTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingGlobalTaskInfo_QuestionId", + table: "ReadingGlobalTaskInfo", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingGlobalTaskInfo_TaskId", + table: "ReadingGlobalTaskInfo", + column: "TaskId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingCustomTag_CreateUserId", + table: "ReadingCustomTag", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingCriterionPage_CreateUserId", + table: "ReadingCriterionPage", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalDataPDF_CreateUserId", + table: "ReadingConsistentClinicalDataPDF", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalDataPDF_ReadingConsistentClinicalDataId", + table: "ReadingConsistentClinicalDataPDF", + column: "ReadingConsistentClinicalDataId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_ClinicalDataTrialSetId", + table: "ReadingConsistentClinicalData", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_CreateUserId", + table: "ReadingConsistentClinicalData", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_ReadingId", + table: "ReadingConsistentClinicalData", + column: "ReadingId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_StudyId", + table: "ReadingConsistentClinicalData", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_SubjectId", + table: "ReadingConsistentClinicalData", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingConsistentClinicalData_TrialId", + table: "ReadingConsistentClinicalData", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalDataPDF_CreateUserId", + table: "ReadingClinicalDataPDF", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalDataPDF_ReadingClinicalDataId", + table: "ReadingClinicalDataPDF", + column: "ReadingClinicalDataId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_ClinicalDataTrialSetId", + table: "ReadingClinicalData", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_CreateUserId", + table: "ReadingClinicalData", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_ReadingId", + table: "ReadingClinicalData", + column: "ReadingId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_StudyId", + table: "ReadingClinicalData", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_SubjectId", + table: "ReadingClinicalData", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_ReadingClinicalData_TrialId", + table: "ReadingClinicalData", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_RankPrice_CreateUserId", + table: "RankPrice", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_QCQuestion_CreateUserId", + table: "QCQuestion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_QCQuestion_ParentId", + table: "QCQuestion", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallengeDialog_CreateUserId", + table: "QCChallengeDialog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallengeDialog_QCChallengeId", + table: "QCChallengeDialog", + column: "QCChallengeId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallengeDialog_SubjectVisitId", + table: "QCChallengeDialog", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallenge_CreateUserId", + table: "QCChallenge", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallenge_LatestReplyUserId", + table: "QCChallenge", + column: "LatestReplyUserId"); + + migrationBuilder.CreateIndex( + name: "IX_QCChallenge_SubjectVisitId", + table: "QCChallenge", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_PublishLog_CreateUserId", + table: "PublishLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousSurgery_ClinicalDataTrialSetId", + table: "PreviousSurgery", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousSurgery_CreateUserId", + table: "PreviousSurgery", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousSurgery_SubjectVisitId", + table: "PreviousSurgery", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousPDF_CreateUserId", + table: "PreviousPDF", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousPDF_SubjectVisitId", + table: "PreviousPDF", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousOther_ClinicalDataTrialSetId", + table: "PreviousOther", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousOther_CreateUserId", + table: "PreviousOther", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousOther_SubjectVisitId", + table: "PreviousOther", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousHistory_ClinicalDataTrialSetId", + table: "PreviousHistory", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousHistory_CreateUserId", + table: "PreviousHistory", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PreviousHistory_SubjectVisitId", + table: "PreviousHistory", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_Postgraduate_CreateUserId", + table: "Postgraduate", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Postgraduate_HospitalId", + table: "Postgraduate", + column: "HospitalId"); + + migrationBuilder.CreateIndex( + name: "IX_PaymentDetail_CreateUserId", + table: "PaymentDetail", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_PaymentAdjustment_CreateUserId", + table: "PaymentAdjustment", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Payment_CreateUserId", + table: "Payment", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_OrganTrialInfo_CreateUserId", + table: "OrganTrialInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_OrganTrialInfo_OrganInfoId", + table: "OrganTrialInfo", + column: "OrganInfoId"); + + migrationBuilder.CreateIndex( + name: "IX_OrganInfo_CreateUserId", + table: "OrganInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_CreateUserId", + table: "NoneDicomStudyFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId", + table: "NoneDicomStudyFile", + column: "ImageLabelNoneDicomStudyId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_NoneDicomStudyId", + table: "NoneDicomStudyFile", + column: "NoneDicomStudyId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_OriginNoneDicomStudyId", + table: "NoneDicomStudyFile", + column: "OriginNoneDicomStudyId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudyFile_VisitTaskId", + table: "NoneDicomStudyFile", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudy_CreateUserId", + table: "NoneDicomStudy", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudy_SubjectId", + table: "NoneDicomStudy", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudy_SubjectVisitId", + table: "NoneDicomStudy", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_NoneDicomStudy_TrialId", + table: "NoneDicomStudy", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_Menu_CreateUserId", + table: "Menu", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Internationalization_CreateUserId", + table: "Internationalization", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Internationalization_PublishLogId", + table: "Internationalization", + column: "PublishLogId"); + + migrationBuilder.CreateIndex( + name: "IX_InspectionFile_CreateUserId", + table: "InspectionFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityUser_CreateUserId", + table: "IdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityUser_TrialId", + table: "IdentityUser", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_Hospital_CreateUserId", + table: "Hospital", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Hospital_SiteId", + table: "Hospital", + column: "SiteId"); + + migrationBuilder.CreateIndex( + name: "IX_FrontAuditConfig_CreateUserId", + table: "FrontAuditConfig", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ExploreRecommend_CreateUserId", + table: "ExploreRecommend", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ExchangeRate_CreateUserId", + table: "ExchangeRate", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EventStoreRecord_CreateUserId", + table: "EventStoreRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCriterion_CreateUserId", + table: "EnrollReadingCriterion", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCriterion_EnrollId", + table: "EnrollReadingCriterion", + column: "EnrollId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCriterion_TrialReadingCriterionId", + table: "EnrollReadingCriterion", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCategory_CreateUserId", + table: "EnrollReadingCategory", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCategory_EnrollId", + table: "EnrollReadingCategory", + column: "EnrollId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollReadingCategory_TrialReadingCriterionId", + table: "EnrollReadingCategory", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollDetail_CreateUserId", + table: "EnrollDetail", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollDetail_DoctorId", + table: "EnrollDetail", + column: "DoctorId"); + + migrationBuilder.CreateIndex( + name: "IX_EnrollDetail_TrialDetailId", + table: "EnrollDetail", + column: "TrialDetailId"); + + migrationBuilder.CreateIndex( + name: "IX_Enroll_CreateUserId", + table: "Enroll", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Enroll_DoctorId", + table: "Enroll", + column: "DoctorId"); + + migrationBuilder.CreateIndex( + name: "IX_Enroll_DoctorUserId", + table: "Enroll", + column: "DoctorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Enroll_TrialId", + table: "Enroll", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailReSendLog_CreateUserId", + table: "EmailReSendLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailRecipientLog_CreateUserId", + table: "EmailRecipientLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailRecipientLog_EmailLogId", + table: "EmailRecipientLog", + column: "EmailLogId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailNoticeUserType_EmailNoticeConfigId", + table: "EmailNoticeUserType", + column: "EmailNoticeConfigId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailNoticeConfig_CreateUserId", + table: "EmailNoticeConfig", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailLog_CreateUserId", + table: "EmailLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailAttachmentLog_CreateUserId", + table: "EmailAttachmentLog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_EmailAttachmentLog_EmailLogId", + table: "EmailAttachmentLog", + column: "EmailLogId"); + + migrationBuilder.CreateIndex( + name: "IX_Education_CreateUserId", + table: "Education", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorWorkload_CreateUserId", + table: "DoctorWorkload", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorWorkload_TrialId", + table: "DoctorWorkload", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorSummarize_CreateUserId", + table: "DoctorSummarize", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorPayInformation_CreateUserId", + table: "DoctorPayInformation", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorDictionary_DictionaryId", + table: "DoctorDictionary", + column: "DictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorDictionary_DoctorId", + table: "DoctorDictionary", + column: "DoctorId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorCriterionFile_CreateUserId", + table: "DoctorCriterionFile", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorCriterionFile_DoctorId", + table: "DoctorCriterionFile", + column: "DoctorId"); + + migrationBuilder.CreateIndex( + name: "IX_DoctorCriterionFile_TrialReadingCriterionId", + table: "DoctorCriterionFile", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_CreateUserId", + table: "Doctor", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_DepartmentId", + table: "Doctor", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_HospitalId", + table: "Doctor", + column: "HospitalId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_PositionId", + table: "Doctor", + column: "PositionId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_RankId", + table: "Doctor", + column: "RankId"); + + migrationBuilder.CreateIndex( + name: "IX_Doctor_SpecialityId", + table: "Doctor", + column: "SpecialityId"); + + migrationBuilder.CreateIndex( + name: "IX_Dictionary_ConfigTypeId", + table: "Dictionary", + column: "ConfigTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Dictionary_CreateUserId", + table: "Dictionary", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Dictionary_ParentId", + table: "Dictionary", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomStudy_CreateUserId", + table: "DicomStudy", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomStudy_SubjectId", + table: "DicomStudy", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomStudy_SubjectVisitId", + table: "DicomStudy", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomStudy_TrialId", + table: "DicomStudy", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomSeries_CreateUserId", + table: "DicomSeries", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomSeries_StudyId", + table: "DicomSeries", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomSeries_SubjectVisitId", + table: "DicomSeries", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomInstance_CreateUserId", + table: "DicomInstance", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomInstance_SeriesId", + table: "DicomInstance", + column: "SeriesId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomInstance_StudyId", + table: "DicomInstance", + column: "StudyId"); + + migrationBuilder.CreateIndex( + name: "IX_DicomInstance_TrialId", + table: "DicomInstance", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_DataInspection_CreateUserId", + table: "DataInspection", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_DataInspection_TrialReadingCriterionId", + table: "DataInspection", + column: "TrialReadingCriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_DataInspection_VisitTaskId", + table: "DataInspection", + column: "VisitTaskId"); + + migrationBuilder.CreateIndex( + name: "IX_CROCompany_CreateUserId", + table: "CROCompany", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CriterionNidusTrial_CreateUserId", + table: "CriterionNidusTrial", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CriterionNidusSystem_CreateUserId", + table: "CriterionNidusSystem", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CriterionNidusSystem_CriterionId", + table: "CriterionNidusSystem", + column: "CriterionId"); + + migrationBuilder.CreateIndex( + name: "IX_CriterionKeyFileRead_CreateUserId", + table: "CriterionKeyFileRead", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CommonDocument_CreateUserId", + table: "CommonDocument", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalTableAnswer_CreateUserId", + table: "ClinicalTableAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalTableAnswer_RowId", + table: "ClinicalTableAnswer", + column: "RowId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalQuestionAnswer_ClinicalFormId", + table: "ClinicalQuestionAnswer", + column: "ClinicalFormId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalQuestionAnswer_CreateUserId", + table: "ClinicalQuestionAnswer", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalForm_ClinicalDataTrialSetId", + table: "ClinicalForm", + column: "ClinicalDataTrialSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalForm_CreateUserId", + table: "ClinicalForm", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalForm_ReadingId", + table: "ClinicalForm", + column: "ReadingId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalForm_SubjectId", + table: "ClinicalForm", + column: "SubjectId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataTrialSet_CreateUserId", + table: "ClinicalDataTrialSet", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataTrialSet_SystemClinicalDataSetId", + table: "ClinicalDataTrialSet", + column: "SystemClinicalDataSetId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataTrialSet_TrialId", + table: "ClinicalDataTrialSet", + column: "TrialId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalDataSystemSet_CreateUserId", + table: "ClinicalDataSystemSet", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ClinicalAnswerRowInfo_CreateUserId", + table: "ClinicalAnswerRowInfo", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CheckChallengeDialog_CreateUserId", + table: "CheckChallengeDialog", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CheckChallengeDialog_SubjectVisitId", + table: "CheckChallengeDialog", + column: "SubjectVisitId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordPermission_AuditDocumentId", + table: "AuditRecordPermission", + column: "AuditDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordPermission_AuditRecordId", + table: "AuditRecordPermission", + column: "AuditRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordPermission_CreateUserId", + table: "AuditRecordPermission", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordIdentityUser_AuditRecordId", + table: "AuditRecordIdentityUser", + column: "AuditRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordIdentityUser_CreateUserId", + table: "AuditRecordIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecordIdentityUser_IdentityUserId", + table: "AuditRecordIdentityUser", + column: "IdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditRecord_CreateUserId", + table: "AuditRecord", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditDocumentClosure_AncestorId", + table: "AuditDocumentClosure", + column: "AncestorId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditDocumentClosure_DescendantId", + table: "AuditDocumentClosure", + column: "DescendantId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditDocument_CreateUserId", + table: "AuditDocument", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AuditDocument_MainFileId", + table: "AuditDocument", + column: "MainFileId"); + + migrationBuilder.CreateIndex( + name: "IX_Attachment_CreateUserId", + table: "Attachment", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Attachment_DoctorId", + table: "Attachment", + column: "DoctorId"); + + migrationBuilder.AddForeignKey( + name: "FK_ReadingClinicalData_DicomStudy_StudyId", + table: "ReadingClinicalData", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "SeqId"); + + migrationBuilder.AddForeignKey( + name: "FK_ReadingConsistentClinicalData_DicomStudy_StudyId", + table: "ReadingConsistentClinicalData", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "SeqId"); + + migrationBuilder.AddForeignKey( + name: "FK_StudyMonitor_TaskStudy_StudyId", + table: "StudyMonitor", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs index 19751ba4a..eb2440c0c 100644 --- a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs +++ b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs @@ -84,9 +84,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Attachment", t => { @@ -147,9 +149,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("MainFileId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("AuditDocument", t => { @@ -175,9 +179,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("AncestorId"); - - b.HasIndex("DescendantId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("AuditDocumentClosure"); }); @@ -232,7 +234,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("AuditRecord"); }); @@ -256,11 +262,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("AuditRecordId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("IdentityUserId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("AuditRecordIdentityUser"); }); @@ -284,11 +290,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("AuditDocumentId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("AuditRecordId"); + b.HasIndex("CreateTime"); - b.HasIndex("CreateUserId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("AuditRecordPermission"); }); @@ -334,7 +340,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CROCompany", t => { @@ -375,9 +385,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectVisitId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CheckChallengeDialog", t => { @@ -413,7 +425,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalAnswerRowInfo", t => { @@ -490,7 +506,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalDataSystemSet", t => { @@ -570,11 +590,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SystemClinicalDataSetId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalDataTrialSet", t => { @@ -621,13 +641,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadingId"); - - b.HasIndex("SubjectId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalForm", t => { @@ -668,9 +686,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalFormId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalQuestionAnswer", t => { @@ -716,9 +736,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("RowId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ClinicalTableAnswer", t => { @@ -791,7 +813,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CommonDocument", t => { @@ -818,7 +844,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CriterionKeyFileRead", t => { @@ -853,9 +883,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CriterionId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CriterionNidusSystem", t => { @@ -885,7 +917,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("CriterionNidusTrial", t => { @@ -1028,11 +1064,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialReadingCriterionId"); + b.HasIndex("CreateTime"); - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DataInspection", t => { @@ -1042,8 +1078,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("Anonymize") @@ -1100,9 +1135,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageColumns") .HasColumnType("int"); @@ -1187,6 +1219,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceOfUltrasoundRegions") .IsRequired() .HasMaxLength(400) @@ -1256,15 +1291,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SeriesId"); + b.HasIndex("CreateTime"); - b.HasIndex("StudyId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DicomInstance", t => { @@ -1274,8 +1307,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("AcquisitionDate") @@ -1330,9 +1362,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageOrientationPatient") .IsRequired() .HasMaxLength(400) @@ -1377,6 +1406,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceName") .IsRequired() .HasMaxLength(400) @@ -1429,13 +1461,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("VisitTaskId") .HasColumnType("uniqueidentifier"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("StudyId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DicomSeries", t => { @@ -1445,10 +1477,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasComment("序列Id 避免内存移动"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("AccessionNumber") .IsRequired() @@ -1520,9 +1550,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("InstanceCount") .HasColumnType("int"); @@ -1595,6 +1622,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + b.Property("SeriesCount") .HasColumnType("int"); @@ -1661,15 +1692,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DicomStudy"); }); @@ -1738,11 +1767,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ConfigTypeId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ParentId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Dictionary", t => { @@ -2067,17 +2096,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DepartmentId"); + b.HasIndex("CreateTime"); - b.HasIndex("HospitalId"); - - b.HasIndex("PositionId"); - - b.HasIndex("RankId"); - - b.HasIndex("SpecialityId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Doctor", t => { @@ -2141,11 +2164,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DoctorCriterionFile", t => { @@ -2171,9 +2194,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("DictionaryId"); - - b.HasIndex("DoctorId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("DoctorDictionary", t => { @@ -2227,7 +2248,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DoctorSummarize", t => { @@ -2326,7 +2351,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Education", t => { @@ -2366,9 +2395,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("EmailLogId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EmailAttachmentLog", t => { @@ -2435,7 +2466,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EmailLog", t => { @@ -2567,7 +2602,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EmailNoticeConfig", t => { @@ -2591,7 +2630,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("EmailNoticeConfigId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("EmailNoticeUserType", t => { @@ -2628,7 +2667,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EmailReSendLog", t => { @@ -2674,9 +2717,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("EmailLogId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EmailRecipientLog", t => { @@ -2767,13 +2812,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorId"); + b.HasIndex("CreateTime"); - b.HasIndex("DoctorUserId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Enroll", t => { @@ -2817,11 +2860,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialDetailId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EnrollDetail", t => { @@ -2851,11 +2894,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("EnrollId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EnrollReadingCategory", t => { @@ -2885,11 +2928,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("EnrollId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EnrollReadingCriterion", t => { @@ -2935,7 +2978,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("EventStoreRecord", t => { @@ -2971,7 +3018,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ExchangeRate", t => { @@ -3037,7 +3088,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ExploreRecommend", t => { @@ -3263,7 +3318,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("FrontAuditConfig", t => { @@ -3344,9 +3403,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SiteId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Hospital", t => { @@ -3475,13 +3536,16 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("UserName") .IsRequired() .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasColumnType("nvarchar(400)") + .UseCollation("Chinese_PRC_CS_AS"); b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("IdentityUser", t => { @@ -3513,6 +3577,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("ImageShare", t => { t.HasComment("影像 - 影像分享记录表"); @@ -3553,7 +3619,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("InspectionFile", t => { @@ -3624,9 +3694,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("PublishLogId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Internationalization", t => { @@ -3736,7 +3808,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Menu", t => { @@ -3846,13 +3922,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("NoneDicomStudy", t => { @@ -3916,15 +3990,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ImageLabelNoneDicomStudyId"); + b.HasIndex("CreateTime"); - b.HasIndex("NoneDicomStudyId"); - - b.HasIndex("OriginNoneDicomStudyId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("NoneDicomStudyFile", t => { @@ -4019,7 +4089,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("OrganInfo", t => { @@ -4119,9 +4193,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("OrganInfoId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("OrganTrialInfo", t => { @@ -4195,7 +4271,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Payment", t => { @@ -4256,7 +4336,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PaymentAdjustment", t => { @@ -4340,7 +4424,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PaymentDetail", t => { @@ -4449,9 +4537,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("HospitalId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Postgraduate", t => { @@ -4505,11 +4595,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PreviousHistory", t => { @@ -4564,11 +4654,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PreviousOther", t => { @@ -4623,9 +4713,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectVisitId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PreviousPDF", t => { @@ -4674,11 +4766,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PreviousSurgery", t => { @@ -4729,7 +4821,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("PublishLog", t => { @@ -4830,11 +4926,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("LatestReplyUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("QCChallenge", t => { @@ -4869,11 +4965,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("QCChallengeId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("QCChallengeDialog", t => { @@ -4937,9 +5033,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ParentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("QCQuestion", t => { @@ -5014,7 +5112,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("RankPrice", t => { @@ -5114,17 +5216,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingPeriodSetId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectId"); - - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadModule", t => { @@ -5158,11 +5254,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalFormId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadModuleId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadModuleCriterionFrom", t => { @@ -5223,17 +5319,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadingId"); - - b.HasIndex("StudyId"); - - b.HasIndex("SubjectId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingClinicalData", t => { @@ -5276,9 +5366,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingClinicalDataId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingClinicalDataPDF", t => { @@ -5341,17 +5433,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ClinicalDataTrialSetId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadingId"); - - b.HasIndex("StudyId"); - - b.HasIndex("SubjectId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingConsistentClinicalData", t => { @@ -5395,9 +5481,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingConsistentClinicalDataId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingConsistentClinicalDataPDF", t => { @@ -5443,7 +5531,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingCriterionPage", t => { @@ -5483,7 +5575,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingCustomTag", t => { @@ -5532,13 +5628,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("GlobalTaskId"); + b.HasIndex("CreateTime"); - b.HasIndex("QuestionId"); - - b.HasIndex("TaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingGlobalTaskInfo", t => { @@ -5584,7 +5678,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingImportFile", t => { @@ -5623,7 +5721,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingJudgeInfo", t => { @@ -5711,9 +5813,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TaskMedicalReviewId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingMedicalReviewDialog", t => { @@ -5756,9 +5860,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TaskMedicalReviewId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingMedicineQuestionAnswer", t => { @@ -5839,9 +5945,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ParentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingMedicineSystemQuestion", t => { @@ -5931,9 +6039,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ParentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingMedicineTrialQuestion", t => { @@ -5990,11 +6100,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("StudyId"); + b.HasIndex("CreateTime"); - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingNoneDicomMark", t => { @@ -6033,9 +6143,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("NoneDicomMarkId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingNoneDicomMarkBinding", t => { @@ -6084,11 +6196,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("OncologyTaskId"); + b.HasIndex("CreateTime"); - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingOncologyTaskInfo", t => { @@ -6138,11 +6250,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingPeriodSetId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingPeriodPlan", t => { @@ -6223,9 +6335,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("VisitStageId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingPeriodSet", t => { @@ -6256,11 +6370,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingPeriodSetId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingPeriodSite", t => { @@ -6328,7 +6442,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingQuestionCriterionSystem", t => { @@ -6564,9 +6682,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingQuestionCriterionTrial", t => { @@ -6803,15 +6923,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("GroupId"); + b.HasIndex("CreateTime"); - b.HasIndex("ParentId"); - - b.HasIndex("ReadingQuestionCriterionSystemId"); - - b.HasIndex("RelevanceId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingQuestionSystem", t => { @@ -7127,17 +7243,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("GroupId"); + b.HasIndex("CreateTime"); - b.HasIndex("ParentId"); - - b.HasIndex("ReadingCriterionPageId"); - - b.HasIndex("ReadingQuestionCriterionTrialId"); - - b.HasIndex("RelevanceId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingQuestionTrial", t => { @@ -7182,9 +7292,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DictionaryId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingSystemCriterionDictionary", t => { @@ -7363,25 +7475,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("FristAddTaskId"); + b.HasIndex("CreateTime"); - b.HasIndex("InstanceId"); - - b.HasIndex("MergeRowId"); - - b.HasIndex("OrganInfoId"); - - b.HasIndex("QuestionId"); - - b.HasIndex("SeriesId"); - - b.HasIndex("SplitRowId"); - - b.HasIndex("StudyId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTableAnswerRowInfo", t => { @@ -7442,15 +7540,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("QuestionId"); + b.HasIndex("CreateTime"); - b.HasIndex("RowId"); - - b.HasIndex("TableQuestionId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTableQuestionAnswer", t => { @@ -7658,11 +7752,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DependParentId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadingQuestionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTableQuestionSystem", t => { @@ -7896,11 +7990,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DependParentId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReadingQuestionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTableQuestionTrial", t => { @@ -7958,13 +8052,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ReadingQuestionTrialId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTaskQuestionAnswer", t => { @@ -8068,11 +8160,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("QuestionId"); + b.HasIndex("CreateTime"); - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTaskQuestionMark", t => { @@ -8105,9 +8197,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TaskId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTaskRelation", t => { @@ -8148,11 +8242,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CriterionId"); + b.HasIndex("CreateTime"); - b.HasIndex("DictionaryId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ReadingTrialCriterionDictionary", t => { @@ -8214,7 +8308,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ResearchPublication", t => { @@ -8271,7 +8369,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DoctorPayInformation", t => { @@ -8332,11 +8434,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SCPImageUpload", t => { @@ -8346,8 +8448,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("Anonymize") @@ -8393,9 +8494,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageColumns") .HasColumnType("int"); @@ -8474,6 +8572,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceOfUltrasoundRegions") .IsRequired() .HasMaxLength(400) @@ -8534,13 +8635,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SeriesId"); + b.HasIndex("CreateTime"); - b.HasIndex("StudyId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SCPInstance", t => { @@ -8610,13 +8711,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SCPPatient", t => { @@ -8626,8 +8725,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("AcquisitionDate") @@ -8682,9 +8780,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageOrientationPatient") .IsRequired() .HasMaxLength(400) @@ -8726,6 +8821,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceName") .IsRequired() .HasMaxLength(400) @@ -8766,11 +8864,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("UpdateUserId") .HasColumnType("uniqueidentifier"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("StudyId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SCPSeries", t => { @@ -8780,8 +8880,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("AccessionNumber") @@ -8861,9 +8960,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("InstanceCount") .HasColumnType("int"); @@ -8934,6 +9030,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SeriesCount") .HasColumnType("int"); @@ -8980,17 +9079,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("UpdateUserId") .HasColumnType("uniqueidentifier"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("PatientId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SCPStudy", t => { @@ -9050,7 +9145,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("ShortcutKey", t => { @@ -9151,9 +9250,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("HospitalId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Site", t => { @@ -9201,7 +9302,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Sponsor", t => { @@ -9282,15 +9387,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("StudyId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectId"); - - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("StudyMonitor", t => { @@ -9426,15 +9527,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("FinalSubjectVisitId"); + b.HasIndex("CreateTime"); - b.HasIndex("LatestSubjectVisitId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Subject", t => { @@ -9500,11 +9597,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingQuestionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectAdditionalEvaluationResult", t => { @@ -9536,9 +9633,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectCanceDoctor", t => { @@ -9575,11 +9674,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectCriteriaEvaluation", t => { @@ -9627,13 +9726,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => { @@ -9678,15 +9775,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SeriesId"); + b.HasIndex("CreateTime"); - b.HasIndex("StudyId"); - - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => { @@ -9738,15 +9831,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReplacedSubjectUserId"); - - b.HasIndex("SubjectId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectUser"); }); @@ -9978,25 +10067,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CurrentActionUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ForwardUserId"); - - b.HasIndex("OutPlanPreviousVisitId"); - - b.HasIndex("PreliminaryAuditUserId"); - - b.HasIndex("ReviewAuditUserId"); - - b.HasIndex("SubjectId"); - - b.HasIndex("SubmitUserId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectVisit", t => { @@ -10056,9 +10131,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectVisitId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SubjectVisitImageBackRecord", t => { @@ -10116,7 +10193,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SysFileType", t => { @@ -10182,7 +10263,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemAnonymization", t => { @@ -10246,9 +10331,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ParentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemBasicData", t => { @@ -10384,9 +10471,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("GroupId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemClinicalQuestion", t => { @@ -10491,7 +10580,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemClinicalTableQuestion", t => { @@ -10520,7 +10613,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemCriterionDictionaryCode", t => { @@ -10554,7 +10651,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemCriterionKeyFile", t => { @@ -10601,11 +10702,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ConfirmUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("SystemDocumentId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemDocConfirmedIdentityUser", t => { @@ -10626,9 +10727,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("NeedConfirmUserTypeId"); - - b.HasIndex("SystemDocumentId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("SystemDocNeedConfirmedUserType", t => { @@ -10692,9 +10791,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("FileTypeId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemDocument", t => { @@ -10751,9 +10852,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SystemDocumentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemDocumentAttachment", t => { @@ -10821,9 +10924,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("PublishedUserId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemNotice", t => { @@ -10847,9 +10952,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SystemNoticeId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemNoticeUserRead", t => { @@ -10876,11 +10983,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SystemNoticeId"); + b.HasIndex("CreateTime"); - b.HasIndex("UserTypeId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("SystemNoticeUserType", t => { @@ -10934,14 +11041,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("EnrollId") - .IsUnique(); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskAllocationRule", t => { @@ -11008,11 +11112,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskConsistentRule", t => { @@ -11043,11 +11147,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("InfluenceTaskId"); + b.HasIndex("CreateTime"); - b.HasIndex("OriginalTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskInfluence", t => { @@ -11057,8 +11161,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("Anonymize") @@ -11109,9 +11212,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageColumns") .HasColumnType("int"); @@ -11190,6 +11290,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceOfUltrasoundRegions") .IsRequired() .HasMaxLength(400) @@ -11262,15 +11365,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SeriesId"); + b.HasIndex("CreateTime"); - b.HasIndex("StudyId"); - - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskInstance", t => { @@ -11399,15 +11500,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("LatestReplyUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("MedicalManagerUserId"); - - b.HasIndex("TrialId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskMedicalReview", t => { @@ -11460,9 +11557,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorUserId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskMedicalReviewRule", t => { @@ -11472,8 +11571,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("AcquisitionDate") @@ -11528,9 +11626,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ImageOrientationPatient") .IsRequired() .HasMaxLength(400) @@ -11572,6 +11667,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SequenceName") .IsRequired() .HasMaxLength(400) @@ -11624,13 +11722,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("VisitTaskId") .HasColumnType("uniqueidentifier"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("StudyId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskSeries", t => { @@ -11640,8 +11738,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => { - b.Property("SeqId") - .ValueGeneratedOnAdd() + b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("AccessionNumber") @@ -11714,9 +11811,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("InstanceCount") .HasColumnType("int"); @@ -11778,6 +11872,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + b.Property("SeriesCount") .HasColumnType("int"); @@ -11832,15 +11929,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("VisitTaskId") .HasColumnType("uniqueidentifier"); - b.HasKey("SeqId"); + b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TaskStudy", t => { @@ -12236,19 +12331,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CROId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("IndicationTypeId"); - - b.HasIndex("PhaseId"); - - b.HasIndex("QCQuestionConfirmedUserId"); - - b.HasIndex("ReviewModeId"); - - b.HasIndex("SponsorId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Trial", t => { @@ -12284,7 +12371,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialAuditShow"); }); @@ -12323,9 +12414,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialBodyPart", t => { @@ -12358,11 +12451,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialClinicalDataSetId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialClinicalDataSetCriterion", t => { @@ -12502,11 +12595,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("GroupId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialClinicalId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialClinicalQuestion", t => { @@ -12624,7 +12717,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialClinicalTableQuestion", t => { @@ -12663,9 +12760,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialReadingCriterionId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialCriterionAdditionalAssessmentType", t => { @@ -12694,9 +12793,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialCriterionId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialCriterionDictionaryCode"); }); @@ -12727,9 +12828,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialCriterionId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialCriterionKeyFile", t => { @@ -12788,7 +12891,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialDicomAE", t => { @@ -12814,9 +12921,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("DictionaryId"); - - b.HasIndex("TrialId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("TrialDictionary", t => { @@ -12863,11 +12968,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ConfirmUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialDocumentId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialDocConfirmedIdentityUser"); }); @@ -12885,9 +12990,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("NeedConfirmUserTypeId"); - - b.HasIndex("TrialDocumentId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("TrialDocNeedConfirmedUserType", t => { @@ -12957,11 +13060,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("FileTypeId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialDocument", t => { @@ -13018,9 +13121,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialDocumentId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialDocumentAttachment", t => { @@ -13041,9 +13146,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("TrialEmailNoticeConfigId"); - - b.HasIndex("UserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("TrialEmailBlackUser", t => { @@ -13202,13 +13305,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SysEmailNoticeConfigId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); - - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialEmailNoticeConfig", t => { @@ -13232,7 +13333,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("TrialEmailNoticeConfigId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("TrialEmailNoticeUser", t => { @@ -13304,11 +13405,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("PhaseId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialExperience", t => { @@ -13332,11 +13433,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("DoctorId"); - - b.HasIndex("EvaluationCriteriaId"); - - b.HasIndex("TrialExperienceId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("TrialExperienceCriteria", t => { @@ -13419,9 +13516,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialExternalUser", t => { @@ -13472,9 +13571,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialFileTypeId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialFile", t => { @@ -13548,7 +13649,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialFileType", t => { @@ -13615,15 +13720,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("HistoryFileRecordId"); + b.HasIndex("CreateTime"); - b.HasIndex("PDFFileRecordId"); - - b.HasIndex("SignFileRecordId"); - - b.HasIndex("WordFileRecordId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialFinalRecord", t => { @@ -13677,11 +13778,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialFileTypeId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialRecordId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialHistoryRecordFile"); }); @@ -13726,11 +13827,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("IdentityUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialIdentityUser", t => { @@ -13808,11 +13909,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialImageDownload", t => { @@ -13861,11 +13962,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("HistoryFileRecordId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialFileRecordId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialNormalRecord", t => { @@ -13917,9 +14018,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialPaymentPrice", t => { @@ -13989,11 +14092,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("ParentId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialQCQuestion", t => { @@ -14044,11 +14147,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectVisitId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialQCQuestionConfigureId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialQCQuestionAnswer", t => { @@ -14118,7 +14221,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialRevenuesPrice", t => { @@ -14177,6 +14284,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("TrialRevenuesPriceVerification", t => { t.HasComment("医生计费 - 项目收入价格验证"); @@ -14218,7 +14327,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSign", t => { @@ -14278,11 +14391,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SiteId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSite", t => { @@ -14344,9 +14457,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialSiteId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSiteDicomAE", t => { @@ -14399,11 +14514,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("EquipmentTypeId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialSiteSurveyId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSiteEquipmentSurvey", t => { @@ -14502,15 +14617,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("PreliminaryUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("ReviewerUserId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSiteSurvey", t => { @@ -14555,13 +14666,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialSiteId"); - - b.HasIndex("UserId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSiteUser", t => { @@ -14647,11 +14756,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialSiteSurveyId"); + b.HasIndex("CreateTime"); - b.HasIndex("UserTypeId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialSiteUserSurvey", t => { @@ -14690,9 +14799,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialStateChange", t => { @@ -14727,9 +14838,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialStatus", t => { @@ -14794,11 +14907,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("HistoryFileRecordId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialFileRecordId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialTrianingRecord", t => { @@ -14844,13 +14957,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); - b.HasIndex("TrialUserId"); - - b.HasIndex("UserId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialUser", t => { @@ -14879,7 +14990,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("TrialVirtualSiteCodeUpdate", t => { @@ -14910,6 +15025,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("TumorAssessment_IRECIST1Point1", t => { t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); @@ -14939,6 +15056,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("TumorAssessment_RECIST1Point1", t => { t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); @@ -14968,6 +15087,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("TumorAssessment_RECIST1Point1BM", t => { t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); @@ -15023,7 +15144,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("UserAgreement", t => { @@ -15080,17 +15205,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectId"); + b.HasIndex("CreateTime"); - b.HasIndex("SubjectVisitId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialSiteId"); - - b.HasIndex("VisitTaskId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("UserFeedBack", t => { @@ -15171,11 +15290,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("ActionIdentityUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("CreateUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("TargetIdentityUserId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("UserLog", t => { @@ -15209,7 +15328,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("UserPassWordLog", t => { @@ -15279,15 +15402,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorId") - .IsUnique() - .HasFilter("[DoctorId] IS NOT NULL"); + b.HasIndex("CreateTime"); - b.HasIndex("IdentityUserId"); - - b.HasIndex("UserTypeId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("User", t => { @@ -15331,6 +15450,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("UserType", t => { t.HasComment("后台 - 系统用户类型 (需要同步)"); @@ -15350,9 +15471,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("DictionaryId"); - - b.HasIndex("UserTypeId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("UserTypeGroup", t => { @@ -15373,9 +15492,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("MenuId"); - - b.HasIndex("UserTypeId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); b.ToTable("UserTypeMenu", t => { @@ -15417,7 +15534,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("UserWLTemplate", t => { @@ -15456,7 +15577,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("Vacation", t => { @@ -15503,7 +15628,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VerificationCode", t => { @@ -15530,7 +15659,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VisitPlanInfluenceStat", t => { @@ -15587,11 +15720,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("SubjectVisitId"); + b.HasIndex("CreateTime"); - b.HasIndex("VisitPlanInfluenceStatId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VisitPlanInfluenceStudy", t => { @@ -15670,9 +15803,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VisitStage", t => { @@ -15931,23 +16066,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("DoctorUserId"); + b.HasIndex("CreateTime"); - b.HasIndex("JudgeResultTaskId"); - - b.HasIndex("JudgeVisitTaskId"); - - b.HasIndex("SouceReadModuleId"); - - b.HasIndex("SourceSubjectVisitId"); - - b.HasIndex("SubjectId"); - - b.HasIndex("TrialId"); - - b.HasIndex("TrialReadingCriterionId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VisitTask", t => { @@ -16022,19 +16145,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("NewReReadingTaskId"); + b.HasIndex("CreateTime"); - b.HasIndex("OriginalReReadingTaskId"); - - b.HasIndex("RequestReReadingConfirmUserId"); - - b.HasIndex("RequestReReadingUserId"); - - b.HasIndex("RootReReadingTaskId"); - - b.HasIndex("TrialId"); + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VisitTaskReReading", t => { @@ -16071,7 +16186,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("VolumeReward", t => { @@ -16151,9 +16270,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); - b.HasIndex("CreateUserId"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); - b.HasIndex("TrialId"); + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); b.ToTable("DoctorWorkload", t => { @@ -16194,6 +16315,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasKey("Id"); + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + b.ToTable("TestLength"); }); @@ -16549,14 +16672,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") .WithMany("DicomInstanceList") .HasForeignKey("SeriesId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") .WithMany("InstanceList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -16586,7 +16707,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") .WithMany("SeriesList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -18076,8 +18196,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") .WithMany("ReadingTableAnswerRowInfoList") - .HasForeignKey("InstanceId") - .HasPrincipalKey("Id"); + .HasForeignKey("InstanceId"); b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") .WithMany() @@ -18095,8 +18214,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSeries") .WithMany() - .HasForeignKey("SeriesId") - .HasPrincipalKey("Id"); + .HasForeignKey("SeriesId"); b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") .WithMany() @@ -18390,14 +18508,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") .WithMany("SCPInstanceList") .HasForeignKey("SeriesId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") .WithMany("InstanceList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -18452,7 +18568,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") .WithMany("SeriesList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -18552,7 +18667,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") .WithMany("DicomStudyMonitorList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -18755,14 +18869,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") .HasForeignKey("SeriesId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -19252,14 +19364,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") .WithMany("InstanceList") .HasForeignKey("SeriesId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") .WithMany("InstanceList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -19345,7 +19455,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") .WithMany("SeriesList") .HasForeignKey("StudyId") - .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); From 665d9a27fb112f7ef13eb198436e05c9f1292c43 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 12 Jan 2026 11:39:51 +0800 Subject: [PATCH 04/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9IRC=20scp=20=E5=8C=BF?= =?UTF-8?q?=E5=90=8D=E5=8C=96=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/Program.cs | 1 + IRC.Core.SCP/Service/CStoreSCPService.cs | 648 +++++++++++--------- IRC.Core.SCP/Service/DicomArchiveService.cs | 67 +- 3 files changed, 353 insertions(+), 363 deletions(-) diff --git a/IRC.Core.SCP/Program.cs b/IRC.Core.SCP/Program.cs index 60fb7e9d3..dfffed1ec 100644 --- a/IRC.Core.SCP/Program.cs +++ b/IRC.Core.SCP/Program.cs @@ -194,6 +194,7 @@ app.MapControllers(); Log.Logger = new LoggerConfiguration() //.MinimumLevel.Information() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("ZiggyCreatures.Caching.Fusion", LogEventLevel.Warning) .WriteTo.Console() .WriteTo.File($"{AppContext.BaseDirectory}Serilogs/.log", rollingInterval: RollingInterval.Day) .CreateLogger(); diff --git a/IRC.Core.SCP/Service/CStoreSCPService.cs b/IRC.Core.SCP/Service/CStoreSCPService.cs index 19521b61f..9aa44bcf9 100644 --- a/IRC.Core.SCP/Service/CStoreSCPService.cs +++ b/IRC.Core.SCP/Service/CStoreSCPService.cs @@ -1,28 +1,29 @@ -using FellowOakDicom.Network; -using FellowOakDicom; +using FellowOakDicom; +using FellowOakDicom.Imaging; +using FellowOakDicom.IO.Buffer; +using FellowOakDicom.Network; +using IRaCIS.Core.Domain.Models; +using IRaCIS.Core.Domain.Share; +using IRaCIS.Core.Infra.EFCore; +using IRaCIS.Core.Infrastructure; +using IRaCIS.Core.Infrastructure.Extention; +using IRaCIS.Core.SCP.Service; +using Medallion.Threading; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Serilog; +using SharpCompress.Common; +using SixLabors.ImageSharp.Formats.Jpeg; using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using IRaCIS.Core.SCP.Service; -using IRaCIS.Core.Domain.Models; -using IRaCIS.Core.Infra.EFCore; -using Medallion.Threading; -using IRaCIS.Core.Domain.Share; -using Serilog; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal; -using Microsoft.Extensions.Options; -using System.Data; -using FellowOakDicom.Imaging; -using SharpCompress.Common; -using SixLabors.ImageSharp.Formats.Jpeg; -using IRaCIS.Core.Infrastructure; -using IRaCIS.Core.Infrastructure.Extention; -using FellowOakDicom.IO.Buffer; +using ZiggyCreatures.Caching.Fusion; namespace IRaCIS.Core.SCP.Service { @@ -120,7 +121,7 @@ namespace IRaCIS.Core.SCP.Service var _trialSiteDicomAERepository = _serviceProvider.GetService>(); - var findTrialSiteAE = _trialSiteDicomAERepository.Where(t => t.CallingAE == association.CallingAE && t.TrialId==_trialId).FirstOrDefault(); + var findTrialSiteAE = _trialSiteDicomAERepository.Where(t => t.CallingAE == association.CallingAE && t.TrialId == _trialId).FirstOrDefault(); if (findTrialSiteAE != null) { @@ -129,7 +130,7 @@ namespace IRaCIS.Core.SCP.Service isCanReceiveIamge = true; } - + } if (association.CallingAE == "test-callingAE") @@ -328,6 +329,11 @@ namespace IRaCIS.Core.SCP.Service var _seriesRepository = _serviceProvider.GetService>(); var _distributedLockProvider = _serviceProvider.GetService(); + var _fusionCache = _serviceProvider.GetService(); + var _trialSiteRepository = _serviceProvider.GetService>(); + var _systemAnonymizationRepository = _serviceProvider.GetService>(); + + var storeRelativePath = string.Empty; var ossFolderPath = $"{_trialId}/Image/PACS/{_trialSiteId}/{studyInstanceUid}"; @@ -336,337 +342,383 @@ namespace IRaCIS.Core.SCP.Service long fileSize = 0; try { - using (MemoryStream ms = new MemoryStream()) + // 直接拿 Dataset(已经完整) + var dataset = request.Dataset; + + #region 匿名化 + + + var anonymizeList = await _fusionCache.GetOrSetAsync(CacheKeys.SystemAnonymization, _ => CacheHelper.GetSystemAnonymizationListAsync(_systemAnonymizationRepository), TimeSpan.FromDays(7)); + + var trialSiteInfo = await _fusionCache.GetOrSetAsync(CacheKeys.TrialSiteInfo(_trialSiteId), _ => CacheHelper.GetTrialSiteInfo(_trialSiteId, _trialSiteRepository), TimeSpan.FromMinutes(2)); + + var fixedFiledList = anonymizeList.Where(t => t.IsFixed).ToList(); + + var ircFiledList = anonymizeList.Where(t => t.IsFixed == false).ToList(); + + foreach (var item in fixedFiledList) { - await request.File.SaveAsync(ms); - #region 1帧拆成多个固定大小的,方便移动端浏览 + var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16)); - // 回到开头,读取 dicom - ms.Position = 0; - var dicomFile = DicomFile.Open(ms); + dataset.AddOrUpdate(dicomTag, item.ReplaceValue); + } - var numberOfFrames = dicomFile.Dataset.GetSingleValueOrDefault(DicomTag.NumberOfFrames, 1); + foreach (var item in ircFiledList) + { - //多帧处理逻辑 - if (numberOfFrames > 1) + var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16)); + + if (dicomTag == DicomTag.ClinicalTrialProtocolID) { - //一定要有像素数据才处理 - var pixelData = DicomPixelData.Create(dicomFile.Dataset); + dataset.AddOrUpdate(DicomTag.ClinicalTrialProtocolID, trialSiteInfo.TrialCode); - if (pixelData != null) - { - try - { + } + if (dicomTag == DicomTag.ClinicalTrialSiteID) + { + dataset.AddOrUpdate(DicomTag.ClinicalTrialSiteID, trialSiteInfo.TrialSiteCode); - Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 开始处理多帧instanceId:{instanceId}"); - - var syntax = pixelData.Syntax; - - // 每个 fragment 固定大小 (64KB 示例,可以自己调整) - int fragmentSize = 20 * 1024; - - - - var frag = dicomFile.Dataset.GetDicomItem(DicomTag.PixelData); - - int fragmentCount = frag?.Fragments?.Count() ?? 0; - - var originOffsetTable = frag?.OffsetTable; //有可能没有表,需要自己重建 - - var bot = new List(); - - uint botOffset = 0; - - //需要拆成固定片段的 - if (syntax.IsEncapsulated && fragmentCount == pixelData.NumberOfFrames && numberOfFrames > 1) - { - - - - var newFragments = new DicomOtherByteFragment(DicomTag.PixelData); - - #region test - //var newDicomFile = dicomFile.Clone(); - - //var newDataset = newDicomFile.Dataset; - - //var dstPd = DicomPixelData.Create(newDataset, true); - - //for (int i = 0; i < pixelData.NumberOfFrames; i++) - //{ - // var frame = pixelData.GetFrame(i); - - // dstPd.AddFrame(frame); - - // var data = frame.Data; - // int offset = 0; - - // while (offset < data.Length) - // { - // int size = Math.Min(fragmentSize, data.Length - offset); - // var buffer = new byte[size]; - // Buffer.BlockCopy(data, offset, buffer, 0, size); - - // newFragments.Fragments.Add(new MemoryByteBuffer(buffer)); - - // offset += size; - - // } - - - //} - //var newOffsetTable = newDataset.GetDicomItem(DicomTag.PixelData).OffsetTable; - - //newFragments.OffsetTable.AddRange(newOffsetTable.ToArray()); - #endregion - - #region test fo-dicom auto bot - //var newDicomFile = dicomFile.Clone(); - - //var newDataset = newDicomFile.Dataset; - - //var dstPd = DicomPixelData.Create(newDataset, true); - - //for (int i = 0; i < pixelData.NumberOfFrames; i++) - //{ - // var frame = pixelData.GetFrame(i); - - // dstPd.AddFrame(frame); - //} - //var newOffsetTable = newDataset.GetDicomItem(DicomTag.PixelData).OffsetTable; - - //Console.WriteLine(newOffsetTable.ToJsonStr()); - #endregion - - #region 最终使用 - - for (int n = 0; n < pixelData.NumberOfFrames; n++) - { - var frameData = pixelData.GetFrame(n); // 获取完整一帧 - var data = frameData.Data; - int offset = 0; - - bot.Add(botOffset); - - botOffset += (uint)data.Length; - - - while (offset < data.Length) - { - botOffset += 8; - - - int size = Math.Min(fragmentSize, data.Length - offset); - var buffer = new byte[size]; - Buffer.BlockCopy(data, offset, buffer, 0, size); - - newFragments.Fragments.Add(new MemoryByteBuffer(buffer)); - - offset += size; - - } - } - - //保留原始偏移表 - - if (originOffsetTable.Count == pixelData.NumberOfFrames) - { - newFragments.OffsetTable.AddRange(originOffsetTable.ToArray()); - - } - else - { - newFragments.OffsetTable.AddRange(bot.ToArray()); - - //Console.WriteLine(bot.ToJsonStr()); - } - - #endregion - - - dicomFile.Dataset.AddOrUpdate(newFragments); - - - // 重新保存 dicom 到流 - ms.SetLength(0); - - dicomFile.Save(ms); - } - //传递过来的就是拆分的,但是是没有偏移表的,我需要自己创建偏移表,不然生成缩略图失败 - else if (syntax.IsEncapsulated && fragmentCount > pixelData.NumberOfFrames && originOffsetTable.Count == 0) - { - - - - uint offset = 0; - - bot.Add(offset); - - var fistSize = frag.Fragments.FirstOrDefault()?.Size ?? 0; - - //和上一个大小不一样 - var isDiffrentBefore = false; - - uint count = 0; - - // 假设你知道每帧对应的 fragment 数量 - foreach (var frameFragments in frag.Fragments) - { - count++; - - if (frameFragments.Size == fistSize) - { - isDiffrentBefore = false; - // 累加这一帧所有 fragment 的大小 - offset += (uint)frameFragments.Size; - continue; - } - else - { - offset += (uint)frameFragments.Size; - isDiffrentBefore = true; - - } - - if (isDiffrentBefore) - { - //每个Fragment 也占用字节 - offset += 8 * count; - bot.Add(offset); - count = 0; - - } - - } - - bot.RemoveAt(bot.Count - 1); - // 设置到新的 PixelData - frag.OffsetTable.AddRange(bot.ToArray()); - - - // 重新保存 DICOM 到流 - ms.SetLength(0); - - dicomFile.Save(ms); - - } - - } - catch (Exception mutiEx) - { - Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 处理多帧失败,上传原始文件:{mutiEx.ToString()}"); - } - } } + if (dicomTag == DicomTag.ClinicalTrialSubjectID) + { + dataset.AddOrUpdate(DicomTag.ClinicalTrialSubjectID, ""); + + } + if (dicomTag == DicomTag.ClinicalTrialTimePointID) + { + dataset.AddOrUpdate(DicomTag.ClinicalTrialTimePointID, ""); + } + + if (dicomTag == DicomTag.PatientID) + { + var pid = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty); + + dataset.AddOrUpdate(DicomTag.PatientID, trialSiteInfo.TrialCode + "_" + pid); + + } + + } + #endregion + + // 构造 DicomFile(不用 Open) + var dicomFile = new DicomFile(dataset); + #region 1帧拆成多个固定大小的,方便移动端浏览 + var numberOfFrames = dicomFile.Dataset.GetSingleValueOrDefault(DicomTag.NumberOfFrames, 1); + //多帧处理逻辑 + if (numberOfFrames > 1) + { + //一定要有像素数据才处理 + var pixelData = DicomPixelData.Create(dicomFile.Dataset); - #endregion - - - #region 本地测试 - //// --- 保存到本地文件测试 --- - //var localPath = @"D:\TestDicom.dcm"; - //using (var fs = new FileStream(localPath, FileMode.Create, FileAccess.Write)) - //{ - // ms.CopyTo(fs); - //} - //return new DicomCStoreResponse(request, DicomStatus.Success); - - #endregion - - ms.Position = 0; - - //irc 从路径最后一截取Guid - storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false); - - fileSize = ms.Length; - - - var @lock = _distributedLockProvider.CreateLock($"{studyInstanceUid}"); - - using (await @lock.AcquireAsync()) + if (pixelData != null) { try { - var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(dicomFile, _trialId, _trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE, fileSize); + + Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 开始处理多帧instanceId:{instanceId}"); + + var syntax = pixelData.Syntax; + + // 每个 fragment 固定大小 (64KB 示例,可以自己调整) + int fragmentSize = 20 * 1024; - var series = await _seriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId); - //没有缩略图 - if (series != null && string.IsNullOrEmpty(series.ImageResizePath)) + var frag = dicomFile.Dataset.GetDicomItem(DicomTag.PixelData); + + int fragmentCount = frag?.Fragments?.Count() ?? 0; + + var originOffsetTable = frag?.OffsetTable; //有可能没有表,需要自己重建 + + var bot = new List(); + + uint botOffset = 0; + + //需要拆成固定片段的 + if (syntax.IsEncapsulated && fragmentCount == pixelData.NumberOfFrames && numberOfFrames > 1) { - // 生成缩略图 - using (var memoryStream = new MemoryStream()) + + + var newFragments = new DicomOtherByteFragment(DicomTag.PixelData); + + #region test + //var newDicomFile = dicomFile.Clone(); + + //var newDataset = newDicomFile.Dataset; + + //var dstPd = DicomPixelData.Create(newDataset, true); + + //for (int i = 0; i < pixelData.NumberOfFrames; i++) + //{ + // var frame = pixelData.GetFrame(i); + + // dstPd.AddFrame(frame); + + // var data = frame.Data; + // int offset = 0; + + // while (offset < data.Length) + // { + // int size = Math.Min(fragmentSize, data.Length - offset); + // var buffer = new byte[size]; + // Buffer.BlockCopy(data, offset, buffer, 0, size); + + // newFragments.Fragments.Add(new MemoryByteBuffer(buffer)); + + // offset += size; + + // } + + + //} + //var newOffsetTable = newDataset.GetDicomItem(DicomTag.PixelData).OffsetTable; + + //newFragments.OffsetTable.AddRange(newOffsetTable.ToArray()); + #endregion + + #region test fo-dicom auto bot + //var newDicomFile = dicomFile.Clone(); + + //var newDataset = newDicomFile.Dataset; + + //var dstPd = DicomPixelData.Create(newDataset, true); + + //for (int i = 0; i < pixelData.NumberOfFrames; i++) + //{ + // var frame = pixelData.GetFrame(i); + + // dstPd.AddFrame(frame); + //} + //var newOffsetTable = newDataset.GetDicomItem(DicomTag.PixelData).OffsetTable; + + //Console.WriteLine(newOffsetTable.ToJsonStr()); + #endregion + + #region 最终使用 + + for (int n = 0; n < pixelData.NumberOfFrames; n++) { - DicomImage image = new DicomImage(dicomFile.Dataset); + var frameData = pixelData.GetFrame(n); // 获取完整一帧 + var data = frameData.Data; + int offset = 0; - var sharpimage = image.RenderImage().AsSharpImage(); - sharpimage.Save(memoryStream, new JpegEncoder()); + bot.Add(botOffset); - // 上传缩略图到 OSS - - var seriesPath = await ossService.UploadToOSSAsync(memoryStream, ossFolderPath, $"{seriesId.ToString()}_{instanceId.ToString()}.preview.jpg", false); + botOffset += (uint)data.Length; - series.ImageResizePath = seriesPath; + while (offset < data.Length) + { + botOffset += 8; + + + int size = Math.Min(fragmentSize, data.Length - offset); + var buffer = new byte[size]; + Buffer.BlockCopy(data, offset, buffer, 0, size); + + newFragments.Fragments.Add(new MemoryByteBuffer(buffer)); + + offset += size; + + } + } + + //保留原始偏移表 + + if (originOffsetTable.Count == pixelData.NumberOfFrames) + { + newFragments.OffsetTable.AddRange(originOffsetTable.ToArray()); } + else + { + newFragments.OffsetTable.AddRange(bot.ToArray()); + + //Console.WriteLine(bot.ToJsonStr()); + } + + #endregion + + + dicomFile.Dataset.AddOrUpdate(newFragments); + + } - - - await _seriesRepository.SaveChangesAsync(); - - if (_ImageUploadList.Any(t => t.StudyInstanceUid == studyInstanceUid)) + //传递过来的就是拆分的,但是是没有偏移表的,我需要自己创建偏移表,不然生成缩略图失败 + else if (syntax.IsEncapsulated && fragmentCount > pixelData.NumberOfFrames && originOffsetTable.Count == 0) { - var find = _ImageUploadList.FirstOrDefault(t => t.StudyInstanceUid.Equals(studyInstanceUid)); - find.SuccessImageCount++; - if (!find.PatientNameList.Any(t => t == patientIdStr) && patientIdStr.IsNotNullOrEmpty()) + uint offset = 0; + + bot.Add(offset); + + var fistSize = frag.Fragments.FirstOrDefault()?.Size ?? 0; + + //和上一个大小不一样 + var isDiffrentBefore = false; + + uint count = 0; + + // 假设你知道每帧对应的 fragment 数量 + foreach (var frameFragments in frag.Fragments) { - find.PatientNameList.Add(patientIdStr); + count++; + + if (frameFragments.Size == fistSize) + { + isDiffrentBefore = false; + // 累加这一帧所有 fragment 的大小 + offset += (uint)frameFragments.Size; + continue; + } + else + { + offset += (uint)frameFragments.Size; + isDiffrentBefore = true; + + } + + if (isDiffrentBefore) + { + //每个Fragment 也占用字节 + offset += 8 * count; + bot.Add(offset); + count = 0; + + } + } - //首次 (默认是Guid 空,数据库归档出了Id) - if (find.SCPStudyId != scpStudyId) - { - find.SCPStudyId = scpStudyId; + bot.RemoveAt(bot.Count - 1); + // 设置到新的 PixelData + frag.OffsetTable.AddRange(bot.ToArray()); + + + - } } - - //监控信息设置 - _upload.FileCount++; - _upload.FileSize = _upload.FileSize + fileSize; } - catch (Exception ex) + catch (Exception mutiEx) + { + Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 处理多帧失败,上传原始文件:{mutiEx.ToString()}"); + } + } + + + } + + #endregion + + #region 本地测试 + //// --- 保存到本地文件测试 --- + //var localPath = @"D:\TestDicom.dcm"; + //using (var fs = new FileStream(localPath, FileMode.Create, FileAccess.Write)) + //{ + // ms.CopyTo(fs); + //} + //return new DicomCStoreResponse(request, DicomStatus.Success); + + #endregion + + // 直接写入内存 + await using var ms = new MemoryStream(); + await dicomFile.SaveAsync(ms); + ms.Position = 0; + + //irc 从路径最后一截取Guid + storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false); + + fileSize = ms.Length; + + + var @lock = _distributedLockProvider.CreateLock($"{studyInstanceUid}"); + + using (await @lock.AcquireAsync()) + { + try + { + var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(dicomFile, _trialId, _trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE, fileSize); + + + var series = await _seriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId); + + //没有缩略图 + if (series != null && string.IsNullOrEmpty(series.ImageResizePath)) { - Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 传输处理异常:{ex.ToString()}"); - - if (_ImageUploadList.Any(t => t.StudyInstanceUid == studyInstanceUid)) + // 生成缩略图 + using (var memoryStream = new MemoryStream()) { - var find = _ImageUploadList.FirstOrDefault(t => t.StudyInstanceUid.Equals(studyInstanceUid)); + DicomImage image = new DicomImage(dicomFile.Dataset); - find.FailedImageCount++; + var sharpimage = image.RenderImage().AsSharpImage(); + sharpimage.Save(memoryStream, new JpegEncoder()); + + // 上传缩略图到 OSS + + var seriesPath = await ossService.UploadToOSSAsync(memoryStream, ossFolderPath, $"{seriesId.ToString()}_{instanceId.ToString()}.preview.jpg", false); + + + series.ImageResizePath = seriesPath; } + } + + + await _seriesRepository.SaveChangesAsync(); + + if (_ImageUploadList.Any(t => t.StudyInstanceUid == studyInstanceUid)) + { + var find = _ImageUploadList.FirstOrDefault(t => t.StudyInstanceUid.Equals(studyInstanceUid)); + + + find.SuccessImageCount++; + + if (!find.PatientNameList.Any(t => t == patientIdStr) && patientIdStr.IsNotNullOrEmpty()) + { + find.PatientNameList.Add(patientIdStr); + } + + //首次 (默认是Guid 空,数据库归档出了Id) + if (find.SCPStudyId != scpStudyId) + { + find.SCPStudyId = scpStudyId; + + } + } + + + //监控信息设置 + _upload.FileCount++; + _upload.FileSize = _upload.FileSize + fileSize; + } + catch (Exception ex) + { + + Log.Logger.Warning($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} 传输处理异常:{ex.ToString()}"); + + if (_ImageUploadList.Any(t => t.StudyInstanceUid == studyInstanceUid)) + { + var find = _ImageUploadList.FirstOrDefault(t => t.StudyInstanceUid.Equals(studyInstanceUid)); + + find.FailedImageCount++; } } + } Log.Logger.Information($"CallingAE:{Association.CallingAE} CalledAE:{Association.CalledAE} {request.SOPInstanceUID} 上传完成 "); diff --git a/IRC.Core.SCP/Service/DicomArchiveService.cs b/IRC.Core.SCP/Service/DicomArchiveService.cs index 1b03ac94e..2d0a54d8c 100644 --- a/IRC.Core.SCP/Service/DicomArchiveService.cs +++ b/IRC.Core.SCP/Service/DicomArchiveService.cs @@ -22,11 +22,7 @@ namespace IRaCIS.Core.SCP.Service public class DicomArchiveService(IRepository _patientRepository, IRepository _studyRepository, IRepository _seriesRepository, - IRepository _instanceRepository, - IDistributedLockProvider _distributedLockProvider, - IRepository _systemAnonymizationRepository, - IRepository _trialSiteRepository, - IFusionCache _fusionCache + IRepository _instanceRepository ) : BaseService, IDicomArchiveService { @@ -45,66 +41,6 @@ namespace IRaCIS.Core.SCP.Service var dataset = dicomFile.Dataset; - #region 匿名化 - - var anonymizeList = await _fusionCache.GetOrSetAsync(CacheKeys.SystemAnonymization, _ => CacheHelper.GetSystemAnonymizationListAsync(_systemAnonymizationRepository), TimeSpan.FromDays(7)); - - var trialSiteInfo = await _fusionCache.GetOrSetAsync(CacheKeys.TrialSiteInfo(trialSiteId), _ => CacheHelper.GetTrialSiteInfo(trialSiteId, _trialSiteRepository), TimeSpan.FromMinutes(2)); - - var fixedFiledList = anonymizeList.Where(t => t.IsFixed).ToList(); - - var ircFiledList = anonymizeList.Where(t => t.IsFixed == false).ToList(); - - foreach (var item in fixedFiledList) - { - - var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16)); - - dataset.AddOrUpdate(dicomTag, item.ReplaceValue); - } - - foreach (var item in ircFiledList) - { - - var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16)); - - if (dicomTag == DicomTag.ClinicalTrialProtocolID) - { - dataset.AddOrUpdate(dicomTag, trialSiteInfo.TrialCode); - - } - if (dicomTag == DicomTag.ClinicalTrialSiteID) - { - dataset.AddOrUpdate(dicomTag, trialSiteInfo.TrialSiteCode); - - } - - if (dicomTag == DicomTag.ClinicalTrialSubjectID) - { - dataset.AddOrUpdate(dicomTag, ""); - - } - if (dicomTag == DicomTag.ClinicalTrialTimePointID) - { - dataset.AddOrUpdate(dicomTag, ""); - } - - if (dicomTag == DicomTag.PatientID) - { - var pid = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty); - - dataset.AddOrUpdate(dicomTag, trialSiteInfo.TrialCode + "_" + pid); - - } - - } - #endregion - - - - - - string studyInstanceUid = dataset.GetString(DicomTag.StudyInstanceUID); string seriesInstanceUid = dataset.GetString(DicomTag.SeriesInstanceUID); string sopInstanceUid = dataset.GetString(DicomTag.SOPInstanceUID); @@ -293,6 +229,7 @@ namespace IRaCIS.Core.SCP.Service findStudy.DicomStudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyTime, string.Empty); findStudy.CalledAE = calledAE; findStudy.CallingAE = callingAE; + findStudy.PatientIdStr = patientIdStr; findStudy.PatientName = dataset.GetSingleValueOrDefault(DicomTag.PatientName, string.Empty); findStudy.PatientSex = dataset.GetSingleValueOrDefault(DicomTag.PatientSex, string.Empty); findStudy.PatientAge = dataset.GetSingleValueOrDefault(DicomTag.PatientAge, string.Empty); From 5fb889bac9bc3bad9b7eab024ce05d9bc7929003 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 12 Jan 2026 14:48:09 +0800 Subject: [PATCH 05/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9A=8F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/DicomDIRHelper.cs | 4 +++- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs index 96de86624..44f71203b 100644 --- a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs +++ b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs @@ -128,7 +128,9 @@ namespace IRaCIS.Core.Application.Helper // 重置流位置 memoryStream.Position = 0; - await _oSSService.UploadToOSSAsync(memoryStream, ossFolder, "DICOMDIR", false); + var relativePath= await _oSSService.UploadToOSSAsync(memoryStream, ossFolder, "DICOMDIR", true); + + dic.Add("DICOMDIR" , relativePath.Split('/').Last()); } //清理临时文件 diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 694cf9cf6..2dad6b397 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -1192,7 +1192,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc if (isSucess) { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/DICOMDIR" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); } } @@ -1632,11 +1632,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { if (isTaskStudy) { - await _taskStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new TaskStudy() { StudyDIRPath = $"/{ossFolder}/DICOMDIR" }); + await _taskStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new TaskStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); } else { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/DICOMDIR" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); } } @@ -2310,7 +2310,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc if (isSucess) { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/DICOMDIR" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); } } } From 0afcaa7d707848f07dcf88b3cfec8ecbe34a4ab5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 12 Jan 2026 15:13:26 +0800 Subject: [PATCH 06/36] =?UTF-8?q?=E6=B8=85=E6=A5=9Adir=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/Service/CStoreSCPService.cs | 2 +- IRaCIS.Core.Application/Helper/OSSService.cs | 20 +++++++++++++++++--- IRaCIS.Core.Application/TestService.cs | 12 ++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/IRC.Core.SCP/Service/CStoreSCPService.cs b/IRC.Core.SCP/Service/CStoreSCPService.cs index 9aa44bcf9..4ffb31d38 100644 --- a/IRC.Core.SCP/Service/CStoreSCPService.cs +++ b/IRC.Core.SCP/Service/CStoreSCPService.cs @@ -394,7 +394,7 @@ namespace IRaCIS.Core.SCP.Service { var pid = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty); - dataset.AddOrUpdate(DicomTag.PatientID, trialSiteInfo.TrialCode + "_" + pid); + dataset.AddOrUpdate(DicomTag.PatientID, trialSiteInfo.TrialCode + "-" + pid); } diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 2339f8df6..018b7f26e 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -160,7 +160,7 @@ public interface IOSSService public Task DeleteFromPrefix(string prefix, bool isCache = false); - public Task DeleteObjects(List objectKeys); + public Task DeleteObjects(List objectKeys, bool isCache = false); List GetRootFolderNames(); @@ -1591,7 +1591,7 @@ public class OSSService : IOSSService } } - public async Task DeleteObjects(List objectKeys) + public async Task DeleteObjects(List objectKeys, bool isCache = false) { GetObjectStoreTempToken(); @@ -1601,9 +1601,23 @@ public class OSSService : IOSSService var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken); + var bucketName = string.Empty; + + if (isCache) + { + Uri uri = new Uri(aliConfig.ViewEndpoint); + string host = uri.Host; // 获取 "zy-irc-test-dev-cache.oss-cn-shanghai.aliyuncs.com" + string[] parts = host.Split('.'); + bucketName = parts[0]; + } + else + { + bucketName = aliConfig.BucketName; + } + if (objectKeys.Count > 0) { - var result = _ossClient.DeleteObjects(new Aliyun.OSS.DeleteObjectsRequest(aliConfig.BucketName, objectKeys, false)); + var result = _ossClient.DeleteObjects(new Aliyun.OSS.DeleteObjectsRequest(bucketName, objectKeys, false)); } } diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index d7fba97a9..7f1a56c7e 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -95,6 +95,18 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Ok(); } + [AllowAnonymous] + + public async Task DeleteCacheDIR() + { + var list= _dicomStudyRepository.Where(t => t.StudyDIRPath!="").Select(t => t.StudyDIRPath).ToList(); + + + await _IOSSService.DeleteObjects(list.Select(t => t.TrimStart('/')).ToList(),true); + + return ResponseOutput.Ok(); + } + [AllowAnonymous] public async Task TestOSS(StorageClass storageClass) { From 1011e704b9417e87cf1f74675228a96ded63aca9 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 13 Jan 2026 10:32:13 +0800 Subject: [PATCH 07/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9aws=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 55 +++++++++++--------- IRaCIS.Core.Application/TestService.cs | 4 +- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 018b7f26e..e0ff9b30f 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -249,7 +249,7 @@ public class OSSService : IOSSService LifeCycleExpiration = { - Days = 30 + Days = 30 //最后一次修改时间 }, StorageClass = StorageClass.Archive } @@ -302,8 +302,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -333,15 +333,15 @@ public class OSSService : IOSSService Transitions = new List { // 1天后转为低频访问 (Standard-IA) - new LifecycleTransition - { - Days = 1, - StorageClass = S3StorageClass.StandardInfrequentAccess // 对应S3 Standard-IA - }, + //new LifecycleTransition + //{ + // Days = 1, //Days' in Transition action must be greater than or equal to 30 for storageClass 'STANDARD_IA'" + // StorageClass = S3StorageClass.StandardInfrequentAccess // 对应S3 Standard-IA + //}, // 30天后转为归档 (Glacier Instant Retrieval) new LifecycleTransition { - Days = 30, + Days = 30, //创建时间 StorageClass = S3StorageClass.GlacierInstantRetrieval // 对应归档(即时检索) } // 如果需要更深的归档,可以继续添加: @@ -765,8 +765,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -891,8 +891,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -966,8 +966,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -1172,8 +1172,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -1546,8 +1546,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -1653,8 +1653,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var amazonS3Client = new AmazonS3Client(credentials, clientConfig); @@ -1728,8 +1728,8 @@ public class OSSService : IOSSService //提供awsEndPoint(域名)进行访问配置 var clientConfig = new AmazonS3Config { - RegionEndpoint = RegionEndpoint.USEast1, - UseHttp = true, + RegionEndpoint = RegionEndpoint.GetBySystemName(awsConfig.Region) + //,UseHttp = true, }; var request = new Amazon.S3.Model.GetObjectMetadataRequest @@ -1813,9 +1813,16 @@ public class OSSService : IOSSService { var awsOptions = ObjectStoreServiceOptions.AWS; + + // 创建 STS 客户端(考虑使用 RegionEndpoint) + var stsConfig = new AmazonSecurityTokenServiceConfig + { + RegionEndpoint = RegionEndpoint.GetBySystemName(awsOptions.Region) + }; + //aws 临时凭证 // 创建 STS 客户端 - var stsClient = new AmazonSecurityTokenServiceClient(awsOptions.AccessKeyId, awsOptions.SecretAccessKey); + var stsClient = new AmazonSecurityTokenServiceClient(awsOptions.AccessKeyId, awsOptions.SecretAccessKey, stsConfig); // 使用 AssumeRole 请求临时凭证 var assumeRoleRequest = new AssumeRoleRequest diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 7f1a56c7e..fd751a860 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -112,9 +112,9 @@ namespace IRaCIS.Core.Application.Service { if (storageClass == StorageClass.IA || storageClass == StorageClass.Archive || storageClass == StorageClass.ColdArchive || storageClass == StorageClass.DeepColdArchive) { - //await _IOSSService.SetImmediateArchiveRule($"Test-Archive/Archive{(int)storageClass}/"); + await _IOSSService.SetImmediateArchiveRule($"Test-Archive/Archive{(int)storageClass}/"); - await _IOSSService.RestoreFilesByPrefixAsync($"Test-Archive/Archive{(int)storageClass}/"); + //await _IOSSService.RestoreFilesByPrefixAsync($"Test-Archive/Archive{(int)storageClass}/"); } From 9e3180b32676f3cfe23ceacf9ec6dee652d3261b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 14 Jan 2026 09:06:29 +0800 Subject: [PATCH 08/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Event_IRC.json | 4 ++-- IRaCIS.Core.API/appsettings.Prod_IRC.json | 2 +- IRaCIS.Core.API/appsettings.US_Prod_IRC.json | 4 ++-- IRaCIS.Core.API/appsettings.US_Test_IRC.json | 3 ++- IRaCIS.Core.API/appsettings.US_Uat_IRC.json | 2 +- IRaCIS.Core.API/appsettings.Uat_IRC.json | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Event_IRC.json b/IRaCIS.Core.API/appsettings.Event_IRC.json index d59688ca2..72220f23f 100644 --- a/IRaCIS.Core.API/appsettings.Event_IRC.json +++ b/IRaCIS.Core.API/appsettings.Event_IRC.json @@ -57,8 +57,8 @@ // 模板类型 1 Elevate 2 Extensive "TemplateType": 2, - //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + + "UserMFAVerifyMinutes": 1440 }, "SystemEmailSendConfig": { "Port": 465, diff --git a/IRaCIS.Core.API/appsettings.Prod_IRC.json b/IRaCIS.Core.API/appsettings.Prod_IRC.json index 700dc1c83..ad0abfff4 100644 --- a/IRaCIS.Core.API/appsettings.Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.Prod_IRC.json @@ -56,7 +56,7 @@ // 模板类型 1 Elevate 2 Extensive "TemplateType": 2, //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + "UserMFAVerifyMinutes": 1440 }, "SystemEmailSendConfig": { diff --git a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json index 299f040d6..63d590106 100644 --- a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json @@ -59,8 +59,8 @@ "TemplateType": 1, "OpenTrialRelationDelete": false, - //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + //MFA免验证 + "UserMFAVerifyMinutes": 1440 }, diff --git a/IRaCIS.Core.API/appsettings.US_Test_IRC.json b/IRaCIS.Core.API/appsettings.US_Test_IRC.json index f0f8da12a..26a63d787 100644 --- a/IRaCIS.Core.API/appsettings.US_Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Test_IRC.json @@ -69,7 +69,8 @@ "TemplateType": 1, "OpenLoginMFA": true, //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + "UserMFAVerifyMinutes": 1440 + }, "SystemEmailSendConfig": { diff --git a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json index 26eb2d496..25fb446d1 100644 --- a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json @@ -68,7 +68,7 @@ // 模板类型 1 Elevate 2 Extensive "TemplateType": 1, //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + "UserMFAVerifyMinutes": 1440 }, "SystemEmailSendConfig": { diff --git a/IRaCIS.Core.API/appsettings.Uat_IRC.json b/IRaCIS.Core.API/appsettings.Uat_IRC.json index d4d54aff4..231382eb1 100644 --- a/IRaCIS.Core.API/appsettings.Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.Uat_IRC.json @@ -75,7 +75,7 @@ // 模板类型 1 Elevate 2 Extensive "TemplateType": 2, //MFA免验证发送天数 - "UserMFAVerifyDays": 1 + "UserMFAVerifyMinutes": 1440 }, "SystemEmailSendConfig": { From f43ac9e64923125ec19eae1d1cf9ba3da55fa4d1 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 14 Jan 2026 09:36:06 +0800 Subject: [PATCH 09/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessFilter/LegacyController/ProjectExceptionFilter.cs | 2 +- IRaCIS.Core.Application/Helper/OSSService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ProjectExceptionFilter.cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ProjectExceptionFilter.cs index 44f3c7005..930c3d9cb 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ProjectExceptionFilter.cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ProjectExceptionFilter.cs @@ -46,7 +46,7 @@ public class ProjectExceptionFilter(ILogger _logger, ISt else { context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (exception.InnerException is null ? (exception.Message) - : (exception.InnerException?.Message )), ApiResponseCodeEnum.ProgramException)); + : (exception.Message + "Inner ExceptionMsg:" + exception.InnerException?.Message)), ApiResponseCodeEnum.ProgramException)); } diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index e0ff9b30f..082959569 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -1561,7 +1561,7 @@ public class OSSService : IOSSService var listObjectsResponse = await amazonS3Client.ListObjectsV2Async(listObjectsRequest); - if (listObjectsResponse.S3Objects.Count > 0) + if (listObjectsResponse.S3Objects?.Count > 0) { // 准备删除请求 var deleteObjectsRequest = new Amazon.S3.Model.DeleteObjectsRequest From 0bb5d09a230d01ab430ba0d20d1247bf3bdcd7ca Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 14 Jan 2026 10:56:08 +0800 Subject: [PATCH 10/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E7=BB=84PD?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Document/DTO/TrialEmailNoticeConfigViewModel.cs | 3 ++- .../Service/Document/TrialEmailNoticeConfigService.cs | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialEmailNoticeConfigViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialEmailNoticeConfigViewModel.cs index 438f8f25f..2c068e6de 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialEmailNoticeConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialEmailNoticeConfigViewModel.cs @@ -30,6 +30,7 @@ namespace IRaCIS.Core.Application.ViewModel public new List CopyUserTypeList => TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(t => t.UserType).ToList(); public List? SysCriterionTypeList { get; set; } + } @@ -127,7 +128,7 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid SubjectId { get; set; } - public Guid TrialReadingCriterionId { get; set; } + public CriterionType CriterionType { get; set; } public EmailBusinessScenario BusinessScenarioEnum { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index 294871348..800feaec9 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -773,10 +773,12 @@ namespace IRaCIS.Core.Application.Service { var subjectId = generateEmailCommand.SubjectId; var businessScenarioEnum = generateEmailCommand.BusinessScenarioEnum; - var trialReadingCriterionId = generateEmailCommand.TrialReadingCriterionId; + var criterionType = generateEmailCommand.CriterionType; - var trialConfig = await _subjectRepository.Where(t => t.Id == subjectId).Select(t => new { t.Trial.IsEnrollementQualificationConfirm, t.Trial.IsPDProgressView }).FirstNotNullAsync(); + + var trialConfig = await _subjectRepository.Where(t => t.Id == subjectId).Select(t => new { t.Trial.IsEnrollementQualificationConfirm, t.Trial.IsPDProgressView, t.TrialId }).FirstNotNullAsync(); + var trialReadingCriterionId = _readingQuestionCriterionTrialRepository.Where(t => t.CriterionType == criterionType && t.TrialId == trialConfig.TrialId).Select(t => t.Id).FirstOrDefault(); //找到入组确认 或者Pd 进展 已生成任务的 访视 var subjectVisitList = await _subjectVisitRepository.Where(t => t.SubjectId == subjectId & t.CheckState == CheckStateEnum.CVPassed && (t.IsEnrollmentConfirm == true || t.PDState == PDStateEnum.PDProgress)).ToListAsync(); @@ -1671,10 +1673,10 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi { //await SyncSystemEmainCofigDocListAsync(inQuery.TrialId); - var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First(); + var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView, TrialCriterionTypeList = t.TrialReadingCriterionList.Where(t => t.IsSigned).Select(t => t.CriterionType).ToList() }).First(); var trialEmailNoticeConfigQueryable = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.EmailTopic.IsNotNullOrEmpty(), t => t.EmailTopic.Contains(inQuery.EmailTopic)||t.EmailTopicCN.Contains(inQuery.EmailTopic)) + .WhereIf(inQuery.EmailTopic.IsNotNullOrEmpty(), t => t.EmailTopic.Contains(inQuery.EmailTopic) || t.EmailTopicCN.Contains(inQuery.EmailTopic)) .WhereIf(inQuery.IsDistinguishCriteria == false, t => t.IsDistinguishCriteria == false) .WhereIf(inQuery.IsDistinguishCriteria == true, t => t.IsDistinguishCriteria == true) .WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeList.Any(c => c == inQuery.CriterionTypeEnum)) @@ -1692,6 +1694,7 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc"); var list = await orderQuery.ToListAsync(); + return ResponseOutput.Ok(list, trialConfig); } From ec87ed1caf66e084580772d6672466112250dd40 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 15 Jan 2026 10:13:01 +0800 Subject: [PATCH 11/36] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=83=A8=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs | 2 ++ IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs index 853063e49..c56dfb668 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs @@ -134,6 +134,8 @@ namespace IRaCIS.Core.Application.Contracts public string Bodypart { get; set; } = string.Empty; + public string BodyPartForEditOther { get; set; } = string.Empty; + public DateTime? StudyTime { get; set; } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index e46c85f9f..07fd93a50 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -382,7 +382,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc Id = t.Id, - Bodypart = t.BodyPartExamined, + Bodypart = t.BodyPartForEdit, + BodyPartForEditOther = t.BodyPartForEditOther, Modalities = t.Modalities, @@ -433,6 +434,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc Id = t.Id, Bodypart = t.BodyPart, + BodyPartForEditOther=t.BodyPartForEditOther, Modalities = t.Modality, From f4af6d3218afec7b55d5a8cd886ecc613bd44485 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 15 Jan 2026 10:28:00 +0800 Subject: [PATCH 12/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/ReadingQuestionViewModel.cs | 2 ++ IRaCIS.Core.Application/Service/Reading/_MapConfig.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index c93ca9478..98e91daec 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -983,6 +983,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public ImageMark? ImageMarkEnum { get; set; } + public string QuestionGroupName { get; set; } + /// /// 影像工具 /// diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index d7cb5270a..ade184f49 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -374,7 +374,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() - + .ForMember(d => d.QuestionGroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName)) .ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName)) .ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName)) .ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName)) From c3a9ca3ca2eb1b8a47f341e42269c129e2921fbb Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 15 Jan 2026 13:47:36 +0800 Subject: [PATCH 13/36] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/UserService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 77b1c03ab..bb5a73685 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -862,7 +862,7 @@ namespace IRaCIS.Core.Application.Service if (isRemember) { await _fusionCache.SetAsync(CacheKeys.UserMFAVerifyPass(identityUserId, _userInfo.BrowserFingerprint), _userInfo.BrowserFingerprint, TimeSpan.FromMinutes(_serviceVerifyConfigConfig.UserMFAVerifyMinutes)); - + Log.Logger.Warning($"MFA登录记录:{_userInfo.UserName} 浏览器标识: {_userInfo.BrowserFingerprint} 设置缓存分钟{_serviceVerifyConfigConfig.UserMFAVerifyMinutes}"); } @@ -1176,15 +1176,20 @@ namespace IRaCIS.Core.Application.Service if (_verifyConfig.CurrentValue.OpenLoginMFA) { + if ((await _fusionCache.GetOrDefaultAsync(CacheKeys.UserMFAVerifyPass(identityUserId, _userInfo.BrowserFingerprint), "")) == _userInfo.BrowserFingerprint) { userLoginReturnModel.IsMFA = false; + + Log.Logger.Warning($"MFA登录:{userName} 浏览器标识: {_userInfo.BrowserFingerprint},判断缓存里存在 "); } else { //MFA 发送邮件 userLoginReturnModel.IsMFA = true; + + Log.Logger.Warning($"MFA登录:{userName} 浏览器标识: {_userInfo.BrowserFingerprint} 判断缓存已经不存在"); } var email = userLoginReturnModel.BasicInfo.EMail; From 310c4a0f7077ea35e36d9d507e3847472e92f12f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 15 Jan 2026 17:17:23 +0800 Subject: [PATCH 14/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9spm=20=E5=90=8C?= =?UTF-8?q?=E6=84=8F=E9=87=8D=E9=98=85=EF=BC=8C=E5=BD=B1=E5=83=8Fbm?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=B7=9F=E8=B8=AA=E9=97=AE=E9=A2=98-?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 5c2392e45..2537cbd5e 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -17,6 +17,7 @@ using MassTransit; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using System.Linq; using System.Linq.Dynamic.Core; using Subject = IRaCIS.Core.Domain.Models.Subject; @@ -2559,8 +2560,11 @@ public class VisitTaskService(IRepository _visitTaskRepository, //删除序列数据 await _subjectCriteriaEvaluationVisitStudyFilterRepository.BatchDeleteNoTrackingAsync(t => t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB && t.SubjectVisit.SubjectId == task.SubjectId && t.SubjectVisitId == task.SourceSubjectVisitId); + + otherVisitIdList = otherVisitIdList.Where(t => t != task.SourceSubjectVisitId.Value).ToList(); } + //BM后续访视 ,筛选状态不变,任务生成状态重置(实际该访视任务状态 可能是重阅重置了或者失效了,需要后续生成,或者取消分配了,需要后续重新分配) await _subjectCriteriaEvaluationVisitFilterRepository.UpdatePartialFromQueryAsync(t => t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB && t.SubjectVisit.SubjectId == task.SubjectId && otherVisitIdList.Contains(t.SubjectVisitId), From e9c6d123d3005b50621b23c9f8b860465316cde4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 16 Jan 2026 15:57:17 +0800 Subject: [PATCH 15/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FileDocProcess/ExcelExportHelper.cs | 83 +++++++++++++++---- .../Common/Export/TumorExportService.cs | 21 +++-- 2 files changed, 79 insertions(+), 25 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs index 6c6a4acae..5c740d0a5 100644 --- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs @@ -18,6 +18,7 @@ using NPOI.HSSF.UserModel; using NPOI.SS.Formula.Functions; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; +using SharpCompress.Common; using System.Collections; using System.Globalization; using Xceed.Document.NET; @@ -870,17 +871,16 @@ public static class ExcelExportHelper //模板路径 var tplPath = physicalPath; - #region 根据中英文 删除模板sheet - - // 打开模板文件 - var templateFile = new FileStream(tplPath, FileMode.Open, FileAccess.Read); // 获取文件流 var templateStream = new MemoryStream(); - templateFile.CopyTo(templateStream); - templateStream.Seek(0, SeekOrigin.Begin); - var workbook = new XSSFWorkbook(templateStream); + #region 根据中英文 删除模板sheet + + // 打开模板文件 + var templateFileStream = new FileStream(tplPath, FileMode.Open, FileAccess.Read); + + var workbook = new XSSFWorkbook(templateFileStream); int sheetCount = workbook.NumberOfSheets; @@ -985,14 +985,8 @@ public static class ExcelExportHelper } } - using (var memoryStream2 = new MemoryStream()) - { - workbook.Write(memoryStream2, true); - - memoryStream2.Seek(0, SeekOrigin.Begin); - - templateStream = memoryStream2; - } + workbook.Write(templateStream, leaveOpen: true); + templateStream.Position = 0; } @@ -1099,6 +1093,63 @@ public static class ExcelExportHelper //模板路径 var tplPath = physicalPath; + var templateStream = new MemoryStream(); + + + #region npoi 移除某一行 + var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; + + if (isEn_US) + { + // 打开模板文件 + using var templateFileStream = new FileStream(tplPath, FileMode.Open, FileAccess.Read); + + using var workbook = new XSSFWorkbook(templateFileStream); + + int sheetCount = workbook.NumberOfSheets; + + int removeRowIndex = 1; // 要删除的行(0-based) + + for (int i = 0; i < sheetCount; i++) + { + var sheet = workbook.GetSheetAt(i); + + // 2️ 删除行 + var row = sheet.GetRow(removeRowIndex); + if (row != null) + { + sheet.RemoveRow(row); + } + + // 3️ 上移后续行 + if (removeRowIndex < sheet.LastRowNum) + { + sheet.ShiftRows( + removeRowIndex + 1, + sheet.LastRowNum, + -1, + true, // copyRowHeight + false // resetOriginalRowHeight + ); + } + } + + workbook.Write(templateStream, leaveOpen: true); + templateStream.Position = 0; + } + else + { + using (var fs = new FileStream(tplPath, FileMode.Open, FileAccess.Read)) + { + fs.CopyTo(templateStream); + } + + templateStream.Position = 0; + } + + + #endregion + var memoryStream = new MemoryStream(); @@ -1107,7 +1158,7 @@ public static class ExcelExportHelper IgnoreTemplateParameterMissing = true, }; - await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, data, config); + await MiniExcel.SaveAsByTemplateAsync(memoryStream, templateStream.ToArray(), data, config); memoryStream.Seek(0, SeekOrigin.Begin); diff --git a/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs b/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs index dd8ce3cd5..f08d03e6c 100644 --- a/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs @@ -601,18 +601,21 @@ public class Tumor_CDISC_ExportService(IRepository t.SubjectCode == task.SubjectCode && t.ARM_TumorNo == $"{task.ArmEnumStr}_{lesion.LessionCode}")) { - tu.BodyPart = _userInfo.IsEn_Us ? trialOrganDic[lesion.OrganInfoId.Value].PartEN : trialOrganDic[lesion.OrganInfoId.Value].Part; + var tu = CreatNewTUExport(task, lesion, visitIndexNoDic, translateDataList, isEn_Us); + + if (lesion.OrganInfoId.HasValue) + { + tu.BodyPart = _userInfo.IsEn_Us ? trialOrganDic[lesion.OrganInfoId.Value].PartEN : trialOrganDic[lesion.OrganInfoId.Value].Part; + } + + + Fill_Resisit_Lugano_TUExport(tu, lesion); + + tuList.Add(tu); } - - Fill_Resisit_Lugano_TUExport(tu, lesion); - - tuList.Add(tu); - #endregion From 74a8ac7575e256715c70b2a0be7d8736cf2e36b2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 16 Jan 2026 16:42:00 +0800 Subject: [PATCH 16/36] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/SystemDocumentService.cs | 1 + .../Service/Document/TrialDocumentService.cs | 1 + IRaCIS.Core.Domain/Document/SystemDocument.cs | 5 + IRaCIS.Core.Domain/Document/TrialDocument.cs | 5 + .../20260116084058_PublishDate.Designer.cs | 21470 ++++++++++++++++ .../Migrations/20260116084058_PublishDate.cs | 39 + .../IRaCISDBContextModelSnapshot.cs | 6 + 7 files changed, 21527 insertions(+) create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.Designer.cs create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.cs diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index 1d3f9da0f..e934d2864 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -208,6 +208,7 @@ namespace IRaCIS.Core.Application.Services await _systemDocumentRepository.BatchUpdateNoTrackingAsync(x => inDto.Ids.Contains(x.Id), x => new SystemDocument() { IsPublish = true, + PublishDate= DateTime.Now, IsDeleted = false, }); diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index ac4d047ed..59c4f2c4c 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -101,6 +101,7 @@ namespace IRaCIS.Core.Application.Services await _trialDocumentRepository.UpdatePartialFromQueryAsync(x => inDto.Ids.Contains(x.Id), x => new TrialDocument() { IsPublish = true, + PublishDate = DateTime.Now, IsDeleted = false, }, false, true); await _trialDocumentRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Domain/Document/SystemDocument.cs b/IRaCIS.Core.Domain/Document/SystemDocument.cs index 9cb755d22..9a1f5dc3d 100644 --- a/IRaCIS.Core.Domain/Document/SystemDocument.cs +++ b/IRaCIS.Core.Domain/Document/SystemDocument.cs @@ -46,6 +46,11 @@ public class SystemDocument : BaseFullDeleteAuditEntity public bool IsPublish { get; set; } = true; + /// + /// 发布时间 + /// + public DateTime? PublishDate { get; set; } + } diff --git a/IRaCIS.Core.Domain/Document/TrialDocument.cs b/IRaCIS.Core.Domain/Document/TrialDocument.cs index 8e9e989c8..e1ccf8864 100644 --- a/IRaCIS.Core.Domain/Document/TrialDocument.cs +++ b/IRaCIS.Core.Domain/Document/TrialDocument.cs @@ -50,6 +50,11 @@ public class TrialDocument : BaseFullDeleteAuditEntity /// public bool IsPublish { get; set; } = true; + + /// + /// 发布时间 + /// + public DateTime? PublishDate { get; set; } } [Comment("项目签署文档附件")] diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.Designer.cs new file mode 100644 index 000000000..e555daba5 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.Designer.cs @@ -0,0 +1,21470 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20260116084058_PublishDate")] + partial class PublishDate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.19") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditDocumentTypeEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsAuthorization") + .HasColumnType("bit"); + + b.Property("MainFileId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditDocument", t => + { + t.HasComment("稽查文档管理"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocumentClosure", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AncestorId") + .HasColumnType("uniqueidentifier") + .HasComment("祖先"); + + b.Property("Depth") + .HasColumnType("int"); + + b.Property("DescendantId") + .HasColumnType("uniqueidentifier") + .HasComment("后代"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("AuditDocumentClosure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("稽查状态"); + + b.Property("AuditTime") + .HasColumnType("date") + .HasComment("稽查日期"); + + b.Property("AuditType") + .HasColumnType("int") + .HasComment("稽查形式"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("CompanyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("IsViewTrainingRecord") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecordIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordPermission", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("AuditRecordPermission"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EnFileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EnPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EnFileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EnPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionKeyFileRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionKeyFileRead", t => + { + t.HasComment("标准阅读关键点"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("RealUrlAndEntity") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModifyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailAttachmentLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachmentPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailAttachmentLog", t => + { + t.HasComment("邮件附件日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailDate") + .HasColumnType("datetime2"); + + b.Property("EmailStateEnum") + .HasColumnType("int"); + + b.Property("EmailSubject") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ErrorInfo") + .IsRequired() + .HasMaxLength(5000) + .HasColumnType("nvarchar(max)"); + + b.Property("MessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SenderAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SenderName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniqueId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailLog", t => + { + t.HasComment("邮件日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeList") + .HasColumnType("nvarchar(max)") + .HasComment("邮件配置的多个标准"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailReSendLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MainMailMessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReMailMessageId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailReSendLog", t => + { + t.HasComment("邮件重发日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailRecipientLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("RecipientAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecipientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecipientTypeEnum") + .HasColumnType("int"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EmailRecipientLog", t => + { + t.HasComment("邮件收件人"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplyCriterionList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsBeforeModifyView") + .HasColumnType("bit"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsDefaultChoice") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PrivacyPolicyId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserAgreementId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCeateSource") + .HasColumnType("int"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .UseCollation("Chinese_PRC_CS_AS"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckState") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResultPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModifyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageLabelNoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadModuleAddTypeEnum") + .HasColumnType("int"); + + b.Property("ReadingPeriodPlanId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingImportFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingImportFile", t => + { + t.HasComment("阅片导入表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoneDicomFileId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingNoneDicomMark", t => + { + t.HasComment("项目阅片 - 非Dicom标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("NoneDicomMarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingNoneDicomMarkBinding", t => + { + t.HasComment("项目阅片 - 非Dicom标记绑定"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("GeneratedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGenerate") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingToolList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ReadingVersionEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExcludeShowVisitList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("ImageMarkEnum") + .HasColumnType("int"); + + b.Property("ImageTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageToolAttribute") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("IdentityRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPreinstall") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("ImageMarkEnum") + .HasColumnType("int"); + + b.Property("ImageTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageToolAttribute") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsPreinstall") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("OptionTypeEnum") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowChartTypeEnum") + .HasColumnType("int"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("PCWGInterimAnswer") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomTagId") + .HasColumnType("uniqueidentifier"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadJsonStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFaild") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsSubjectQuit") + .HasColumnType("bit") + .HasComment("受试者退出"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("SuspendReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("访视中止原因"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int") + .HasComment("一致性核查 回退"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SecondReviewState") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisitImageBackRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplyReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ApplyUserRole") + .HasColumnType("int"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ImageBackState") + .HasColumnType("int") + .HasComment("影像上传 回退"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SubjectVisitImageBackRecord", t => + { + t.HasComment("受试者访视影像回退记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SysFileType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveTypeEnum") + .HasColumnType("int") + .HasComment("报告、文档、记录"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmRecord") + .HasColumnType("bit") + .HasComment("是否确认收入项"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("SubIdentificationEnum") + .HasColumnType("int") + .HasComment("子类标识,是取那个表的数据"); + + b.Property("SysTemplateTypeEnum") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SysFileType", t => + { + t.HasComment("后台 - 系统文件类型表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionKeyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemCriterionKeyFile", t => + { + t.HasComment("系统标准阅片关键点文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentStaffTrainDays") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublish") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NewStaffTrainDays") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OffLine") + .HasColumnType("bit"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemDocumentAttachment", t => + { + t.HasComment("后台 - 系统签署文档附件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("BitsAllocated") + .HasColumnType("int"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CorrectedImage") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DecayCorrection") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EncapsulatedDocument") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrameTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("IsEncapsulated") + .HasColumnType("bit"); + + b.Property("MediaStorageSOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MediaStorageSOPInstanceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotometricInterpretation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleIntercept") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RescaleSlope") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SOPClassUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceOfUltrasoundRegions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TransferSytaxUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Units") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomSeriesTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RadiopharmaceuticalInformationSequence") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEditOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceSerialNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeviceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DicomStudyTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ManufacturerModelName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientWeight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeqId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("SoftwareVersions") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyDIRPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("ImageFormatList") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsExternalViewTrialChart") + .HasColumnType("bit") + .HasComment("外部人员 查看项目报表"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsIQCAutoNextTask") + .HasColumnType("bit"); + + b.Property("IsIQCAutoTaskDistinguishType") + .HasColumnType("bit"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsShowStudyName") + .HasColumnType("bit"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialAuditShow", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FrontAuditConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsShow") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialAuditShow"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialCriterionKeyFile", t => + { + t.HasComment("项目标准阅片关键点文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentStaffTrainDays") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublish") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NewStaffTrainDays") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OffLine") + .HasColumnType("bit"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialDocumentAttachment", t => + { + t.HasComment("项目签署文档附件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("后续删除,需要维护数据"); + + b.Property("CriterionTypeList") + .HasColumnType("nvarchar(max)") + .HasComment("邮件配置的多个标准"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("下次版本删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFile", t => + { + t.HasComment("项目文件 - 文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveTypeEnum") + .HasColumnType("int") + .HasComment("报告、文档、记录"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("文件Id"); + + b.Property("FirstFinalDate") + .HasColumnType("date") + .HasComment("首次定稿日期"); + + b.Property("IsConfirmRecord") + .HasColumnType("bit") + .HasComment("是否确认收入项"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsSelfDefine") + .HasColumnType("bit") + .HasComment("是否自定义"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("SubIdentificationEnum") + .HasColumnType("int") + .HasComment("子类标识,是取那个表的数据"); + + b.Property("SysFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联系统文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFileType", t => + { + t.HasComment("项目文件 - 文件类型表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史记录"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PDFFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("定稿PDF"); + + b.Property("SignFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("签名页"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WordFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("定稿Word"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialFinalRecord", t => + { + t.HasComment("项目文件 - 定稿记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialHistoryRecordFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileSize") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialHistoryRecordFile"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史文件"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("关联具体的文件记录,记录里面有大小,格式,名称"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialNormalRecord", t => + { + t.HasComment("项目文件 - 一般文件记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SecondReviewTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("历史文件"); + + b.Property("IsAuthorizedView") + .HasColumnType("bit") + .HasComment("是否授权查看"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialFileRecordId") + .HasColumnType("uniqueidentifier") + .HasComment("关联具体的文件记录,记录里面有大小,格式,名称"); + + b.Property("TrialFileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("关联项目文件类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrianingCount") + .HasColumnType("int"); + + b.Property("TrianingDate") + .HasColumnType("date"); + + b.Property("TrianingState") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("培训效果"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialTrianingRecord", t => + { + t.HasComment("项目文件 - 培训记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("这里实际是UserRoleId"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("FileContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FileEnContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileVersion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("UpdateDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserAgreementTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserAgreement", t => + { + t.HasComment("后台 - 用户协议和隐私采集"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsIgnoreUncommonly") + .HasColumnType("bit") + .HasComment("是否忽略异地登录"); + + b.Property("IsLoginUncommonly") + .HasColumnType("bit") + .HasComment("异地登录"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDoubleScreen") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsCopyLesionAnswer") + .HasColumnType("bit"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsViewStudyPart") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PMBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("退回原因"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("RandomOrder") + .HasColumnType("int") + .HasComment("完全随机阅片号"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.02 全局任务在截止访视号上+0.03 肿瘤0.06"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("CreateTime"); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime")); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "MainAuditDocument") + .WithMany("AuditDocumentOldVersionList") + .HasForeignKey("MainFileId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("MainAuditDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocumentClosure", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "Ancestor") + .WithMany("DescendantList") + .HasForeignKey("AncestorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "Descendant") + .WithMany("AncestorList") + .HasForeignKey("DescendantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ancestor"); + + b.Navigation("Descendant"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditRecord", "AuditRecord") + .WithMany("AuditRecordIdentityUserList") + .HasForeignKey("AuditRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("AuditRecordList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuditRecord"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordPermission", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.AuditDocument", "AuditDocument") + .WithMany() + .HasForeignKey("AuditDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.AuditRecord", "AuditRecord") + .WithMany() + .HasForeignKey("AuditRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuditDocument"); + + b.Navigation("AuditRecord"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ClinicalFormList") + .HasForeignKey("ReadingId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionKeyFileRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailAttachmentLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailLog", "EmailLog") + .WithMany("AttachmentList") + .HasForeignKey("EmailLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EmailLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailReSendLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailRecipientLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailLog", "EmailLog") + .WithMany("EmailRecipientLogList") + .HasForeignKey("EmailLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EmailLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("NoneDicomStudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "ImageMarkNoneDicomStudy") + .WithMany("ImageLabelNoneDicomFileList") + .HasForeignKey("ImageLabelNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ImageMarkNoneDicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingImportFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", null) + .WithMany("ReadingNoneDicomMarkList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingNoneDicomMark", "ReadingNoneDicomMark") + .WithMany() + .HasForeignKey("NoneDicomMarkId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingNoneDicomMark"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany("OncologyResultList") + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "FristAddTask") + .WithMany() + .HasForeignKey("FristAddTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSeries") + .WithMany() + .HasForeignKey("SeriesId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSeries"); + + b.Navigation("FristAddTask"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionMarkList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisitImageBackRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectVisitImageBackRecordList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SysFileType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionKeyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocumentAttachmentList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithOne("TaskAllocationRule") + .HasForeignKey("IRaCIS.Core.Domain.Models.TaskAllocationRule", "EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.StudyName", "StudyNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("EnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("IsChoose") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("StudyNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("StudyNameList"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialAuditShow", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("KeyFileList") + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocumentAttachmentList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFileType", "TrialFileType") + .WithMany() + .HasForeignKey("TrialFileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialFileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "PDFFileRecord") + .WithMany() + .HasForeignKey("PDFFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "SignFileRecord") + .WithMany() + .HasForeignKey("SignFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "WordFileRecord") + .WithMany() + .HasForeignKey("WordFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("PDFFileRecord"); + + b.Navigation("SignFileRecord"); + + b.Navigation("WordFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialHistoryRecordFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFileType", "TrialFileType") + .WithMany() + .HasForeignKey("TrialFileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFinalRecord", "TrialFinalRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialNormalRecord", "TrialNormalRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialTrianingRecord", "TrialTrianingRecord") + .WithMany("TrialHistoryRecordFileList") + .HasForeignKey("TrialRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialFileType"); + + b.Navigation("TrialFinalRecord"); + + b.Navigation("TrialNormalRecord"); + + b.Navigation("TrialTrianingRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "TrialFileRecord") + .WithMany() + .HasForeignKey("TrialFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("TrialFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFileRecord") + .WithMany() + .HasForeignKey("HistoryFileRecordId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "TrialFileRecord") + .WithMany() + .HasForeignKey("TrialFileRecordId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HistoryFileRecord"); + + b.Navigation("TrialFileRecord"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b => + { + b.Navigation("AncestorList"); + + b.Navigation("AuditDocumentOldVersionList"); + + b.Navigation("DescendantList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b => + { + b.Navigation("AuditRecordIdentityUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("InstanceList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("EmailRecipientLogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + + b.Navigation("TaskAllocationRule") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("AuditRecordList"); + + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("ImageLabelNoneDicomFileList"); + + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("KeyFileList"); + + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectVisitImageBackRecordList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("TrialQCQuestionAnswerList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + + b.Navigation("SystemDocumentAttachmentList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + + b.Navigation("TrialDocumentAttachmentList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialNormalRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialTrianingRecord", b => + { + b.Navigation("TrialHistoryRecordFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("OncologyResultList"); + + b.Navigation("ReadingNoneDicomMarkList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("ReadingTaskQuestionMarkList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.cs new file mode 100644 index 000000000..744b7d5b0 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20260116084058_PublishDate.cs @@ -0,0 +1,39 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class PublishDate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "PublishDate", + table: "TrialDocument", + type: "datetime2", + nullable: true); + + migrationBuilder.AddColumn( + name: "PublishDate", + table: "SystemDocument", + type: "datetime2", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "PublishDate", + table: "TrialDocument"); + + migrationBuilder.DropColumn( + name: "PublishDate", + table: "SystemDocument"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs index eb2440c0c..038d1cf3d 100644 --- a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs +++ b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs @@ -10780,6 +10780,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); + b.Property("PublishDate") + .HasColumnType("datetime2"); + b.Property("SignViewMinimumMinutes") .HasColumnType("int"); @@ -13046,6 +13049,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("PublishDate") + .HasColumnType("datetime2"); + b.Property("SignViewMinimumMinutes") .HasColumnType("int"); From 6dce301ff7165d04436ce24ffcaa45e60c6d5c0b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 16 Jan 2026 16:50:48 +0800 Subject: [PATCH 17/36] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=9F=B9=E8=AE=AD?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Document/DTO/SystemDocumentViewModel.cs | 4 ++++ .../Document/Interface/ITrialDocumentService.cs | 2 ++ .../Service/Document/TrialDocumentService.cs | 15 +++++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index a0b89b912..e7ce1734a 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -92,6 +92,10 @@ namespace IRaCIS.Core.Application.Contracts public class UnionDocumentWithConfirmInfoView : UnionDocumentView { + public DocUserSignType SysDocUserSignType { get; set; } + + public bool IsConfirmIdentityUserInner { get; set; } + public Guid TrialId { get; set; } public bool IsNeedSendEmial { get; set; } diff --git a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs index e2ed0597b..d83a287ac 100644 --- a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs @@ -19,6 +19,8 @@ namespace IRaCIS.Core.Application.Contracts Task UserConfirm(UserConfirmCommand userConfirmCommand); Task> GetTrialUserSelect(Guid trialId); + Task>> GetSysDocumentConfirmList(SystemDocQuery inQuery); + //Task> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument); //List GetTrialUserDocumentList(Guid trialId); diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index ac4d047ed..e9850bc6f 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -951,10 +951,13 @@ namespace IRaCIS.Core.Application.Services return ResponseOutput.Ok(new PageOutput()); } + var systemDocQuery = - from sysDoc in _systemDocumentRepository.AsQueryable(false) + from sysDoc in _systemDocumentRepository.Where(t => t.IsPublish) .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) - from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId))) + from identityUser in _identityUserRepository.AsQueryable(false) + + .Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId))) .Where(t => inQuery.UserId != null ? t.Id == inQuery.UserId : true) .Where(t => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true) .Where(t => isEA ? t.IsZhiZhun == true : true) //EA 只能查看内部人员文档 @@ -963,6 +966,8 @@ namespace IRaCIS.Core.Application.Services select new UnionDocumentWithConfirmInfoView() { IsSystemDoc = true, + SysDocUserSignType = sysDoc.DocUserSignType, + IsConfirmIdentityUserInner = identityUser.IsZhiZhun, Id = sysDoc.Id, CreateTime = sysDoc.CreateTime, IsDeleted = sysDoc.IsDeleted, @@ -994,14 +999,16 @@ namespace IRaCIS.Core.Application.Services }; var unionQuery = systemDocQuery.IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmTime == null)) + //外部人员 只签署 外部需要签署的 + .Where(t => t.IsConfirmIdentityUserInner == false ? t.SysDocUserSignType == DocUserSignType.InnerAndOuter : true) .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) .WhereIf(inQuery.StartConfirmTime != null, t => t.ConfirmTime >= inQuery.StartConfirmTime.Value) .WhereIf(inQuery.EndConfirmTime != null, t => t.ConfirmTime <= inQuery.EndConfirmTime.Value) - .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) - .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) + .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) + .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) .WhereIf(isInternal == false, t => t.ConfirmTime != null); //不是内部的人,看有签名时间的 From 05859662150352f1c77e2056557aff8a2796c3c0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 16 Jan 2026 16:53:09 +0800 Subject: [PATCH 18/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=A1=A8bug?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/Export/TumorExportService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs b/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs index f08d03e6c..214fae7bb 100644 --- a/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/Export/TumorExportService.cs @@ -601,9 +601,11 @@ public class Tumor_CDISC_ExportService(IRepository t.SubjectCode == task.SubjectCode && t.ARM_TumorNo == $"{task.ArmEnumStr}_{lesion.LessionCode}")) { - var tu = CreatNewTUExport(task, lesion, visitIndexNoDic, translateDataList, isEn_Us); if (lesion.OrganInfoId.HasValue) { From 7fed9cdceb84afcd00f586e411700f3721dff8a7 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 16 Jan 2026 17:23:09 +0800 Subject: [PATCH 19/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AD=BE=E7=BD=B2?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/SystemDocumentService.cs | 2 ++ .../Service/Document/TrialDocumentService.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index e934d2864..e279c8f91 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -302,6 +302,7 @@ namespace IRaCIS.Core.Application.Services { AttachmentCount=sysDoc.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count(), IsSystemDoc = true, + IsPublish=sysDoc.IsPublish, CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays, NewStaffTrainDays = sysDoc.NewStaffTrainDays, Id = sysDoc.Id, @@ -327,6 +328,7 @@ namespace IRaCIS.Core.Application.Services //UserTypeShortName = user.UserTypeRole.UserTypeShortName }; + var list = await query //过滤掉删除的,并且没有签名的 .Where(t => !(t.IsDeleted == true && t.ConfirmTime == null)) diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 6fcb47220..ef14f4cfb 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -969,6 +969,7 @@ namespace IRaCIS.Core.Application.Services IsSystemDoc = true, SysDocUserSignType = sysDoc.DocUserSignType, IsConfirmIdentityUserInner = identityUser.IsZhiZhun, + IsPublish=sysDoc.IsPublish, Id = sysDoc.Id, CreateTime = sysDoc.CreateTime, IsDeleted = sysDoc.IsDeleted, From cf2b3f59544a6ed582167a6475577c88376e7ede Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 11:03:36 +0800 Subject: [PATCH 20/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=89=E5=BA=8F?= =?UTF-8?q?=E9=80=80=E5=9B=9E=EF=BC=8C=E5=BD=B1=E5=93=8D=E6=97=A0=E5=BA=8F?= =?UTF-8?q?=E9=80=80=E5=9B=9E=E4=BB=BB=E5=8A=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 2537cbd5e..e6e02aeb1 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1173,7 +1173,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect) .WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId) .WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate)) - .WhereIf(critrion.CriterionType == CriterionType.OCT, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.Where(t=>t.Modality=="OCT").SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true) + .WhereIf(critrion.CriterionType == CriterionType.OCT, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.Modality == "OCT").SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true) .WhereIf(critrion.CriterionType == CriterionType.IVUS, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.Modality == "IVUS").SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true); var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }); @@ -2293,12 +2293,12 @@ public class VisitTaskService(IRepository _visitTaskRepository, foreach (var item in readingTableAnswerRowInfoList) { - if (item.SplitRowId!=null&&lesionRelationship.ContainsKey(item.SplitRowId.Value)) + if (item.SplitRowId != null && lesionRelationship.ContainsKey(item.SplitRowId.Value)) { item.SplitRowId = lesionRelationship[item.SplitRowId.Value]; } - if (item.MergeRowId!=null&&lesionRelationship.ContainsKey(item.MergeRowId.Value)) + if (item.MergeRowId != null && lesionRelationship.ContainsKey(item.MergeRowId.Value)) { item.MergeRowId = lesionRelationship[item.MergeRowId.Value]; } @@ -2403,6 +2403,10 @@ public class VisitTaskService(IRepository _visitTaskRepository, //另一个阅片人的任务根据任务进度自动进入PM退回或PM申请重阅 filterExpression = filterExpression.And(t => t.VisitTaskNum >= task.VisitTaskNum); + //退回只影响有序的后续所有的,无序的当前访视 + filterExpression = filterExpression.And(t => (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder) || + (t.TrialReadingCriterion.IsReadingTaskViewInOrder != ReadingOrder.InOrder && t.SourceSubjectVisitId == task.SourceSubjectVisitId)); + var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); @@ -2564,7 +2568,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, otherVisitIdList = otherVisitIdList.Where(t => t != task.SourceSubjectVisitId.Value).ToList(); } - + //BM后续访视 ,筛选状态不变,任务生成状态重置(实际该访视任务状态 可能是重阅重置了或者失效了,需要后续生成,或者取消分配了,需要后续重新分配) await _subjectCriteriaEvaluationVisitFilterRepository.UpdatePartialFromQueryAsync(t => t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB && t.SubjectVisit.SubjectId == task.SubjectId && otherVisitIdList.Contains(t.SubjectVisitId), @@ -2727,6 +2731,13 @@ public class VisitTaskService(IRepository _visitTaskRepository, //默认影响的都是该标准的任务 filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId); } + + //退回只影响有序的后续所有的,无序的当前访视 + if (isReReading == false) + { + filterExpression = filterExpression.And(t => (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder) || + (t.TrialReadingCriterion.IsReadingTaskViewInOrder != ReadingOrder.InOrder && t.SourceSubjectVisitId == filterObj.SourceSubjectVisitId)); + } } From 59ba1a61935aecd3a12be4357ca73ac6191db3f4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 13:52:06 +0800 Subject: [PATCH 21/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8F=AF=E7=A9=BA?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BC=A0=E5=8F=82=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E5=A4=84=E7=90=86=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Progranm.cs | 3 + .../NullToEmptyStringResolver.cs | 69 ++++++++++++++----- .../LegacyController/ModelActionFilter .cs | 64 +++++++++++++++++ IRaCIS.Core.Application/TestService.cs | 40 ++++++++++- 4 files changed, 158 insertions(+), 18 deletions(-) diff --git a/IRaCIS.Core.API/Progranm.cs b/IRaCIS.Core.API/Progranm.cs index 69be6d74f..c80a2171a 100644 --- a/IRaCIS.Core.API/Progranm.cs +++ b/IRaCIS.Core.API/Progranm.cs @@ -96,6 +96,9 @@ builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resourc // 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim() builder.Services.AddControllers(options => { + // 插到最前,抢在默认绑定器之前 + options.ModelBinderProviders.Insert(0, new NullableStructModelBinderProvider()); + options.Filters.Add(); options.Filters.Add(); options.Filters.Add(); diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs index 04bb3a2c0..4a636d653 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs @@ -3,8 +3,10 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; +using System.Reflection.Metadata; namespace IRaCIS.Core.API { @@ -51,34 +53,69 @@ namespace IRaCIS.Core.API } public class NullToEmptyStringValueProvider : IValueProvider { - PropertyInfo _MemberInfo; + PropertyInfo _memberInfo; + private readonly bool _isNullable; public NullToEmptyStringValueProvider(PropertyInfo memberInfo) { - _MemberInfo = memberInfo; + _memberInfo = memberInfo; + } + + + + // DTO → JSON 返回前端的时候 处理null 变为"" 方便前端判断 public object GetValue(object target) { - object result = _MemberInfo.GetValue(target); - if (_MemberInfo.PropertyType == typeof(string) && result == null) result = ""; - else if (_MemberInfo.PropertyType == typeof(String[]) && result == null) result = new string[] { }; - //else if (_MemberInfo.PropertyType == typeof(Nullable) && result == null) result = 0; - //else if (_MemberInfo.PropertyType == typeof(Nullable) && result == null) result = 0.00M; + var result = _memberInfo.GetValue(target); + // 检查类型是否为string或string? + if (_memberInfo.PropertyType == typeof(string) && result == null) + { + #region 返回的时候处理 string string? null 为"" 不区分处理 + + + //// 如果是string?类型,返回null 可以做到,但是得反射,因为 string string? 是编译层区分的 + + //var isNullable1 = _memberInfo.CustomAttributes + // .Any(a => a.AttributeType.Name == "NullableAttribute"); + + ////var isNullable2 = _memberInfo.CustomAttributes + //// .Any(a => a.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute"); + + //if (isNullable1) + //{ + // return result; + //} + + #endregion + + + // 如果是string类型,返回空字符串 + return string.Empty; + } return result; } + + + //影响 模型绑定时接收前端的值,同时影响 正常 JSON 序列化 public void SetValue(object target, object value) { - if (_MemberInfo.PropertyType == typeof(string)) - { - //去掉前后空格 - _MemberInfo.SetValue(target, value == null ? string.Empty : value.ToString() == string.Empty ? value : value/*.ToString().Trim()*/); + _memberInfo.SetValue(target, value); + + + //// 会影响 string? 传递null 变为"" + + //if (_memberInfo.PropertyType == typeof(string)) + //{ + // //去掉前后空格 + // _memberInfo.SetValue(target, value == null ? string.Empty : value.ToString() == string.Empty ? value : value/*.ToString().Trim()*/); + //} + //else + //{ + // _memberInfo.SetValue(target, value); + //} - } - else - { - _MemberInfo.SetValue(target, value); - } } } diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs index 63255f4fa..abe4800de 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Localization; using Newtonsoft.Json; @@ -28,3 +29,66 @@ public class ModelActionFilter(IStringLocalizer _localizer) : ActionFilterAttrib } } } + + +public class NullableStructModelBinderProvider : IModelBinderProvider +{ + public IModelBinder? GetBinder(ModelBinderProviderContext context) + { + // 获取要绑定的模型类型,比如 Guid?, int?, DateTime? 等 + var type = context.Metadata.ModelType; + + // 检查是否是 Nullable 类型 + // 1. 必须是泛型类型 + // 2. 泛型定义必须是 Nullable<> + if (!type.IsGenericType || + type.GetGenericTypeDefinition() != typeof(Nullable<>)) + return null; // 返回 null 表示"我不处理这个类型" + + + // 获取可空类型内部的实际类型,如 Guid?, int? 中的 Guid, int + var innerType = Nullable.GetUnderlyingType(type)!; + + // 创建默认的模型绑定器(系统的原逻辑) + var fallback = context.CreateBinder(context.Metadata); + + // 创建泛型绑定器类型:NullableEmptyStringToNullBinder + // 比如对于 Guid?,会创建 NullableEmptyStringToNullBinder + var binderType = typeof(NullableEmptyStringToNullBinder<>).MakeGenericType(innerType); + + // 实例化绑定器,传入默认绑定器作为备用 + return (IModelBinder)Activator.CreateInstance(binderType, fallback)!; + } +} + +// 泛型约束:T 必须是值类型(struct),这确保了只处理可空值类型 +public class NullableEmptyStringToNullBinder : IModelBinder where T : struct +{ + private readonly IModelBinder _fallbackBinder; + + // 构造函数接收一个备用的绑定器(系统的默认绑定器) + public NullableEmptyStringToNullBinder(IModelBinder fallbackBinder) + { + _fallbackBinder = fallbackBinder; + } + + public async Task BindModelAsync(ModelBindingContext context) + { + // 获取前端传递的值 + var value = context.ValueProvider.GetValue(context.ModelName).FirstValue; + + // 关键逻辑:如果值是空字符串或空白,直接返回 null + if (string.IsNullOrWhiteSpace(value)) + { + // 设置绑定结果为 null(表示空值) + context.Result = ModelBindingResult.Success(null); + return; + } + + // 非空 → 完全走系统原逻辑 + + // 如果不是空字符串,则使用系统的默认绑定逻辑 + // 比如将 "123" 转换为 int? 123,或将 GUID 字符串转换为 Guid? + await _fallbackBinder.BindModelAsync(context); + } +} \ No newline at end of file diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index fd751a860..f7c4723e2 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -39,6 +39,7 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Processing; using System.Collections.Concurrent; +using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.Globalization; using System.IO; @@ -77,6 +78,41 @@ namespace IRaCIS.Core.Application.Service public static int IntValue = 100; + public class ModelVerifyCommand + { + public int? IntNUllValue { get; set; } + public int IntValue { get; set; } + + public string StringValue { get; set; } + + public string? StringNUllValue { get; set; } + + public Guid GuidValue { get; set; } = NewId.NextSequentialGuid(); + + public Guid? GuidNUllValue { get; set; } + + [NotDefault] + public Guid GuidValueNotDefault { get; set; } + + + public bool BoolValue { get; set; } + + public bool? BoolNUllValue { get; set; } + + public DateTime DateTimeValue { get; set; } + + public DateTime? DateTimeNUllValue { get; set; } + } + + //创建一个模型验证的方法 + [AllowAnonymous] + [HttpPost] + public async Task PostModelVerify(ModelVerifyCommand modelVerify) + { + return ResponseOutput.Ok(modelVerify); + } + + [AllowAnonymous] public async Task CreatNewDBStruct() @@ -99,10 +135,10 @@ namespace IRaCIS.Core.Application.Service public async Task DeleteCacheDIR() { - var list= _dicomStudyRepository.Where(t => t.StudyDIRPath!="").Select(t => t.StudyDIRPath).ToList(); + var list = _dicomStudyRepository.Where(t => t.StudyDIRPath != "").Select(t => t.StudyDIRPath).ToList(); - await _IOSSService.DeleteObjects(list.Select(t => t.TrimStart('/')).ToList(),true); + await _IOSSService.DeleteObjects(list.Select(t => t.TrimStart('/')).ToList(), true); return ResponseOutput.Ok(); } From 473d10533a76e136344f4366d275fb5424bd0bd4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 14:25:59 +0800 Subject: [PATCH 22/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Progranm.cs | 2 +- .../LegacyController/ModelActionFilter .cs | 61 ++++++++++++++----- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.API/Progranm.cs b/IRaCIS.Core.API/Progranm.cs index c80a2171a..394625ba5 100644 --- a/IRaCIS.Core.API/Progranm.cs +++ b/IRaCIS.Core.API/Progranm.cs @@ -97,7 +97,7 @@ builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resourc builder.Services.AddControllers(options => { // 插到最前,抢在默认绑定器之前 - options.ModelBinderProviders.Insert(0, new NullableStructModelBinderProvider()); + //options.ModelBinderProviders.Insert(0, new NullableStructModelBinderProvider()); options.Filters.Add(); options.Filters.Add(); diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs index abe4800de..8095e55b8 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs @@ -38,30 +38,38 @@ public class NullableStructModelBinderProvider : IModelBinderProvider // 获取要绑定的模型类型,比如 Guid?, int?, DateTime? 等 var type = context.Metadata.ModelType; + //创建默认的模型绑定器(系统的原逻辑) + var fallback = context.CreateBinder(context.Metadata); + + + // 1. 处理 string 类型 + if (type == typeof(string)) + { + return new StringNotNullableModelBinder(fallback); + } + // 检查是否是 Nullable 类型 // 1. 必须是泛型类型 // 2. 泛型定义必须是 Nullable<> - if (!type.IsGenericType || - type.GetGenericTypeDefinition() != typeof(Nullable<>)) - return null; // 返回 null 表示"我不处理这个类型" + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + // 获取可空类型内部的实际类型,如 Guid?, int? 中的 Guid, int + var innerType = Nullable.GetUnderlyingType(type)!; - // 获取可空类型内部的实际类型,如 Guid?, int? 中的 Guid, int - var innerType = Nullable.GetUnderlyingType(type)!; + var binderType = typeof(NullableEmptyStringToNullBinder<>).MakeGenericType(innerType); - // 创建默认的模型绑定器(系统的原逻辑) - var fallback = context.CreateBinder(context.Metadata); + // 实例化绑定器,传入默认绑定器作为备用 + return (IModelBinder)Activator.CreateInstance(binderType, fallback)!; + } - // 创建泛型绑定器类型:NullableEmptyStringToNullBinder - // 比如对于 Guid?,会创建 NullableEmptyStringToNullBinder - var binderType = typeof(NullableEmptyStringToNullBinder<>).MakeGenericType(innerType); - // 实例化绑定器,传入默认绑定器作为备用 - return (IModelBinder)Activator.CreateInstance(binderType, fallback)!; + return null; // 返回 null 表示"我不处理这个类型" + } } -// 泛型约束:T 必须是值类型(struct),这确保了只处理可空值类型 +// 泛型约束:T 必须是值类型(struct),这确保了只处理可空值类型 比如处理guid? 传递"" 为null public class NullableEmptyStringToNullBinder : IModelBinder where T : struct { private readonly IModelBinder _fallbackBinder; @@ -91,4 +99,29 @@ public class NullableEmptyStringToNullBinder : IModelBinder where T : struct // 比如将 "123" 转换为 int? 123,或将 GUID 字符串转换为 Guid? await _fallbackBinder.BindModelAsync(context); } -} \ No newline at end of file +} + +// 处理 string 的绑定器 如果前端不传递 或者null 时 处理为 "" +public class StringNotNullableModelBinder : IModelBinder +{ + private readonly IModelBinder _fallbackBinder; + + public StringNotNullableModelBinder(IModelBinder fallbackBinder) + { + _fallbackBinder = fallbackBinder; + } + + public async Task BindModelAsync(ModelBindingContext context) + { + var value = context.ValueProvider.GetValue(context.ModelName).FirstValue; + + // 前端不传或传空字符串,都设为 string.Empty + if (string.IsNullOrWhiteSpace(value)) + { + context.Result = ModelBindingResult.Success(string.Empty); + return; + } + + await _fallbackBinder.BindModelAsync(context); + } +} From 296ecfa9d218c3c78b21fc0d53f8b3b03ad0d64b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 15:00:35 +0800 Subject: [PATCH 23/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9json=20=E5=BA=8F?= =?UTF-8?q?=E5=88=97=E5=8C=96=E7=BB=91=E5=AE=9A=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewtonsoftJson/NullToEmptyStringResolver.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs index 4a636d653..f6330817f 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs @@ -101,12 +101,25 @@ namespace IRaCIS.Core.API public void SetValue(object target, object value) { - _memberInfo.SetValue(target, value); //// 会影响 string? 传递null 变为"" - //if (_memberInfo.PropertyType == typeof(string)) + var isNullable1 = _memberInfo.CustomAttributes.Any(a => a.AttributeType.Name == "NullableAttribute"); + + + if (_memberInfo.PropertyType == typeof(string) && isNullable1 == false) + { + //如果不处理 前段传递null string不会接收,说前段没传递会验证报错 + _memberInfo.SetValue(target, value == null ? string.Empty : value); + } + else + { + _memberInfo.SetValue(target, value); + + } + + //if () //{ // //去掉前后空格 // _memberInfo.SetValue(target, value == null ? string.Empty : value.ToString() == string.Empty ? value : value/*.ToString().Trim()*/); From 2bf47515e783427ce6288e0760e33a4ea7421de2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 15:33:57 +0800 Subject: [PATCH 24/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NullToEmptyStringResolver.cs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs index f6330817f..15814a6cc 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs @@ -102,33 +102,39 @@ namespace IRaCIS.Core.API { + #region 前端针对 string 类型的变量,如果传递null 会报错必传 - //// 会影响 string? 传递null 变为"" - - var isNullable1 = _memberInfo.CustomAttributes.Any(a => a.AttributeType.Name == "NullableAttribute"); - - - if (_memberInfo.PropertyType == typeof(string) && isNullable1 == false) + if (_memberInfo.PropertyType == typeof(string)) { - //如果不处理 前段传递null string不会接收,说前段没传递会验证报错 _memberInfo.SetValue(target, value == null ? string.Empty : value); } else { _memberInfo.SetValue(target, value); - } - //if () + #endregion + + #region 处理模型验证区分 string string? + + //var isNullable1 = _memberInfo.CustomAttributes.Any(a => a.AttributeType.Name == "NullableAttribute"); + + ////不影响 string? 传递null 变为"" + //if (_memberInfo.PropertyType == typeof(string) && isNullable1 == false) //{ - // //去掉前后空格 - // _memberInfo.SetValue(target, value == null ? string.Empty : value.ToString() == string.Empty ? value : value/*.ToString().Trim()*/); + // //如果不处理 前段传递null string不会接收,说前段没传递会验证报错 + // _memberInfo.SetValue(target, value == null ? string.Empty : value); //} //else //{ + // _memberInfo.SetValue(target, value); + //} + #endregion + + } } From 0ef7fd85d4c75c4389b5a0afd322c65e0b65af3c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 19 Jan 2026 17:58:47 +0800 Subject: [PATCH 25/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90dir?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Progranm.cs | 5 +- .../NullToEmptyStringResolver.cs | 18 ++-- .../LegacyController/ModelActionFilter .cs | 88 ++++--------------- .../Helper/DicomDIRHelper.cs | 6 +- .../ImageAndDoc/DownloadAndUploadService.cs | 14 ++- IRaCIS.Core.Application/TestService.cs | 5 ++ 6 files changed, 50 insertions(+), 86 deletions(-) diff --git a/IRaCIS.Core.API/Progranm.cs b/IRaCIS.Core.API/Progranm.cs index 394625ba5..a3b23aa44 100644 --- a/IRaCIS.Core.API/Progranm.cs +++ b/IRaCIS.Core.API/Progranm.cs @@ -96,8 +96,11 @@ builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resourc // 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim() builder.Services.AddControllers(options => { + // 关键配置:禁用不可空引用类型的自动 Required 验证 + options.SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true; + // 插到最前,抢在默认绑定器之前 - //options.ModelBinderProviders.Insert(0, new NullableStructModelBinderProvider()); + //options.ModelBinderProviders.Insert(0, new SpecificNullableBinderProvider()); options.Filters.Add(); options.Filters.Add(); diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs index 15814a6cc..146bdf25d 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/NullToEmptyStringResolver.cs @@ -101,22 +101,24 @@ namespace IRaCIS.Core.API public void SetValue(object target, object value) { + _memberInfo.SetValue(target, value); #region 前端针对 string 类型的变量,如果传递null 会报错必传 - if (_memberInfo.PropertyType == typeof(string)) - { - _memberInfo.SetValue(target, value == null ? string.Empty : value); - } - else - { - _memberInfo.SetValue(target, value); - } + //if (_memberInfo.PropertyType == typeof(string)) + //{ + // _memberInfo.SetValue(target, value == null ? string.Empty : value); + //} + //else + //{ + // _memberInfo.SetValue(target, value); + //} #endregion #region 处理模型验证区分 string string? + //////接收模型的时候 定义的明明是string 但是上面也有该属性,判断不准的 比如阅片跟踪列表查询 //var isNullable1 = _memberInfo.CustomAttributes.Any(a => a.AttributeType.Name == "NullableAttribute"); ////不影响 string? 传递null 变为"" diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs index 8095e55b8..7d7c885a3 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs @@ -1,8 +1,11 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; +using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Localization; using Newtonsoft.Json; +using System.Reflection; namespace IRaCIS.Core.Application.Filter; @@ -31,97 +34,40 @@ public class ModelActionFilter(IStringLocalizer _localizer) : ActionFilterAttrib } -public class NullableStructModelBinderProvider : IModelBinderProvider + + + +public class SpecificNullableBinderProvider : IModelBinderProvider { public IModelBinder? GetBinder(ModelBinderProviderContext context) { - // 获取要绑定的模型类型,比如 Guid?, int?, DateTime? 等 var type = context.Metadata.ModelType; - //创建默认的模型绑定器(系统的原逻辑) - var fallback = context.CreateBinder(context.Metadata); - - - // 1. 处理 string 类型 - if (type == typeof(string)) + // 只处理 Guid? 和 int? + if (type == typeof(Guid?) || type == typeof(int?)) { - return new StringNotNullableModelBinder(fallback); + return new SpecificNullableBinder(); } - // 检查是否是 Nullable 类型 - // 1. 必须是泛型类型 - // 2. 泛型定义必须是 Nullable<> - if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - // 获取可空类型内部的实际类型,如 Guid?, int? 中的 Guid, int - var innerType = Nullable.GetUnderlyingType(type)!; - - - var binderType = typeof(NullableEmptyStringToNullBinder<>).MakeGenericType(innerType); - - // 实例化绑定器,传入默认绑定器作为备用 - return (IModelBinder)Activator.CreateInstance(binderType, fallback)!; - } - - - return null; // 返回 null 表示"我不处理这个类型" - + return null; } } -// 泛型约束:T 必须是值类型(struct),这确保了只处理可空值类型 比如处理guid? 传递"" 为null -public class NullableEmptyStringToNullBinder : IModelBinder where T : struct +public class SpecificNullableBinder : IModelBinder { - private readonly IModelBinder _fallbackBinder; - - // 构造函数接收一个备用的绑定器(系统的默认绑定器) - public NullableEmptyStringToNullBinder(IModelBinder fallbackBinder) + public Task BindModelAsync(ModelBindingContext context) { - _fallbackBinder = fallbackBinder; - } - - public async Task BindModelAsync(ModelBindingContext context) - { - // 获取前端传递的值 var value = context.ValueProvider.GetValue(context.ModelName).FirstValue; - // 关键逻辑:如果值是空字符串或空白,直接返回 null if (string.IsNullOrWhiteSpace(value)) { - // 设置绑定结果为 null(表示空值) context.Result = ModelBindingResult.Success(null); - return; } - - // 非空 → 完全走系统原逻辑 - - // 如果不是空字符串,则使用系统的默认绑定逻辑 - // 比如将 "123" 转换为 int? 123,或将 GUID 字符串转换为 Guid? - await _fallbackBinder.BindModelAsync(context); - } -} - -// 处理 string 的绑定器 如果前端不传递 或者null 时 处理为 "" -public class StringNotNullableModelBinder : IModelBinder -{ - private readonly IModelBinder _fallbackBinder; - - public StringNotNullableModelBinder(IModelBinder fallbackBinder) - { - _fallbackBinder = fallbackBinder; - } - - public async Task BindModelAsync(ModelBindingContext context) - { - var value = context.ValueProvider.GetValue(context.ModelName).FirstValue; - - // 前端不传或传空字符串,都设为 string.Empty - if (string.IsNullOrWhiteSpace(value)) + else { - context.Result = ModelBindingResult.Success(string.Empty); - return; + context.Result = ModelBindingResult.Success(value); } - await _fallbackBinder.BindModelAsync(context); + return Task.CompletedTask; } -} +} \ No newline at end of file diff --git a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs index 44f71203b..12c387440 100644 --- a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs +++ b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs @@ -1,4 +1,5 @@ -using FellowOakDicom; +using DocumentFormat.OpenXml.Office.CustomUI; +using FellowOakDicom; using FellowOakDicom.Media; using System; using System.Collections.Generic; @@ -57,6 +58,7 @@ namespace IRaCIS.Core.Application.Helper var mappings = new List(); int index = 1; + var studyUid=list.FirstOrDefault()?.StudyInstanceUid; var dicomDir = new DicomDirectory(); @@ -130,7 +132,7 @@ namespace IRaCIS.Core.Application.Helper var relativePath= await _oSSService.UploadToOSSAsync(memoryStream, ossFolder, "DICOMDIR", true); - dic.Add("DICOMDIR" , relativePath.Split('/').Last()); + dic.Add($"{studyUid}_DICOMDIR" , relativePath.Split('/').Last()); } //清理临时文件 diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 2dad6b397..4491fb6fe 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -1185,6 +1185,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc foreach (var item in list.GroupBy(t => new { t.StudyInstanceUid, t.DicomStudyId })) { + + var studyUid = item.Key.StudyInstanceUid; + var ossFolder = $"{pathInfo.TrialId}/Image/{pathInfo.SubjectId}/{pathInfo.VisitId}/{item.Key.StudyInstanceUid}"; var isSucess = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), dirDic, ossFolder, _oSSService)); @@ -1192,7 +1195,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc if (isSucess) { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic[$"{studyUid}_DICOMDIR"]}" }); } } @@ -1625,6 +1628,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var ossFolder = $"{pathInfo.TrialId}/Image/{pathInfo.SubjectId}/{visitId}/{item.Key.StudyInstanceUid}"; + var studyUid = item.Key.StudyInstanceUid; + var isSucess = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), dirDic, ossFolder, _oSSService)); @@ -1632,11 +1637,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { if (isTaskStudy) { - await _taskStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new TaskStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); + await _taskStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new TaskStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic[$"{studyUid}_DICOMDIR"]}" }); } else { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic[$"{studyUid}_DICOMDIR"]}" }); } } @@ -2303,6 +2308,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var subjectId = item.First().SubjectId; + var studyUid = item.Key.StudyInstanceUid; var ossFolder = $"{inCommand.TrialId}/Image/{subjectId}/{visitId}/{item.Key.StudyInstanceUid}"; @@ -2310,7 +2316,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc if (isSucess) { - await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic["DICOMDIR"]}" }); + await _dicomStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Key.DicomStudyId, u => new DicomStudy() { StudyDIRPath = $"/{ossFolder}/{dirDic[$"{studyUid}_DICOMDIR"]}" }); } } } diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index f7c4723e2..ecb3badd6 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -87,6 +87,8 @@ namespace IRaCIS.Core.Application.Service public string? StringNUllValue { get; set; } + public string StringBackDefaultValue { get; set; } = string.Empty; + public Guid GuidValue { get; set; } = NewId.NextSequentialGuid(); public Guid? GuidNUllValue { get; set; } @@ -104,12 +106,15 @@ namespace IRaCIS.Core.Application.Service public DateTime? DateTimeNUllValue { get; set; } } + //创建一个模型验证的方法 [AllowAnonymous] [HttpPost] public async Task PostModelVerify(ModelVerifyCommand modelVerify) { + return ResponseOutput.Ok(modelVerify); + } From e6458e66dffe0fa78ad0d27c9e8d9136f03502dc Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Mon, 19 Jan 2026 20:52:42 +0800 Subject: [PATCH 26/36] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewtonsoftJson/JSONTimeZoneConverter.cs | 5 +-- .../LegacyController/ModelActionFilter .cs | 35 ------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs index 9b289e8a4..87fda8456 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs @@ -89,7 +89,9 @@ namespace IRaCIS.Core.API { if (DateTime.TryParse((string)reader.Value, out dateTime) == false) { - return null; + + throw new JsonSerializationException($"Could not convert string to DateTime: {reader.Value} Path {reader.Path}"); + //return null; } } @@ -113,7 +115,6 @@ namespace IRaCIS.Core.API //第一个参数默认使用系统本地时区 也就是应用服务器的时区 DateTime clientZoneTime = TimeZoneInfo.ConvertTime(nullableDateTime.Value, _clientTimeZone); - //writer.WriteValue(clientZoneTime); writer.WriteValue(clientZoneTime.ToString(_dateFormat)); } diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs index 7d7c885a3..ee1d392cf 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/ModelActionFilter .cs @@ -36,38 +36,3 @@ public class ModelActionFilter(IStringLocalizer _localizer) : ActionFilterAttrib - -public class SpecificNullableBinderProvider : IModelBinderProvider -{ - public IModelBinder? GetBinder(ModelBinderProviderContext context) - { - var type = context.Metadata.ModelType; - - // 只处理 Guid? 和 int? - if (type == typeof(Guid?) || type == typeof(int?)) - { - return new SpecificNullableBinder(); - } - - return null; - } -} - -public class SpecificNullableBinder : IModelBinder -{ - public Task BindModelAsync(ModelBindingContext context) - { - var value = context.ValueProvider.GetValue(context.ModelName).FirstValue; - - if (string.IsNullOrWhiteSpace(value)) - { - context.Result = ModelBindingResult.Success(null); - } - else - { - context.Result = ModelBindingResult.Success(value); - } - - return Task.CompletedTask; - } -} \ No newline at end of file From 61ab33b3f3ebbb727c04d9fdd17e4c3f2ebbd105 Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Mon, 19 Jan 2026 23:46:44 +0800 Subject: [PATCH 27/36] =?UTF-8?q?efcore=20=E9=87=8D=E5=A4=8D=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=95=B0=E7=BB=84json=E5=88=97=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E6=97=B6=E5=80=99=E4=BC=9A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=A5=87=E6=80=AA=E9=97=AE=E9=A2=98=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repository/IRaCISContextExtension.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Repository/IRaCISContextExtension.cs b/IRaCIS.Core.Infra.EFCore/Repository/IRaCISContextExtension.cs index 71fb563e1..ebd59fe2a 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/IRaCISContextExtension.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/IRaCISContextExtension.cs @@ -119,7 +119,10 @@ namespace IRaCIS.Core.Infra.EFCore /// EntityState.Detached的实体 修改 部分字段 public static void EntityModifyPartialFiled(this IRaCISDBContext _dbContext, T waitModifyEntity, Expression> updateFactory) where T : Entity { - var entityEntry = _dbContext.Entry(waitModifyEntity); + //解决重复跟踪问题 + var tracked = _dbContext.ChangeTracker.Entries().FirstOrDefault(e => e.Entity.Id.Equals(waitModifyEntity.Id)); + var entityEntry = tracked?? _dbContext.Entry(waitModifyEntity); + //entityEntry.State = EntityState.Detached; var list = ((MemberInitExpression)updateFactory.Body).Bindings.Select(mb => mb.Member.Name) @@ -134,7 +137,7 @@ namespace IRaCIS.Core.Infra.EFCore foreach (PropertyInfo prop in list) { - _dbContext.Entry(waitModifyEntity).Property(prop.Name).IsModified = true; + entityEntry.Property(prop.Name).IsModified = true; object value = prop.GetValue(applyObj); prop.SetValue(waitModifyEntity, value); From 9b90ded79f32474d4e4b337db180310f59669c62 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 21 Jan 2026 09:42:51 +0800 Subject: [PATCH 28/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewtonsoftJson/JSONTimeZoneConverter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs index 87fda8456..37853b02a 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs @@ -90,8 +90,8 @@ namespace IRaCIS.Core.API if (DateTime.TryParse((string)reader.Value, out dateTime) == false) { - throw new JsonSerializationException($"Could not convert string to DateTime: {reader.Value} Path {reader.Path}"); - //return null; + //throw new JsonSerializationException($"Could not convert string to DateTime: {reader.Value} Path {reader.Path}"); + return null; } } From 1aa1189ae80874aea98e12851950917f2c9b1057 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 21 Jan 2026 10:23:30 +0800 Subject: [PATCH 29/36] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewtonsoftJson/JSONTimeZoneConverter.cs | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs index 37853b02a..6f2623694 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs @@ -71,32 +71,25 @@ namespace IRaCIS.Core.API DateTime dateTime; - if (reader.ValueType == typeof(DateTime) || reader.ValueType == typeof(DateTime?)) + // 2. 检查目标类型是否可空 + bool isNullable = objectType == typeof(DateTime?); + + var canConvert = DateTime.TryParse(reader.Value?.ToString(), out dateTime); + + + if (isNullable == false && canConvert == false) { - DateTime? nullableDateTime = reader.Value as DateTime?; - - if (nullableDateTime != null && nullableDateTime.HasValue) - { - dateTime = nullableDateTime.Value; - } - else - { - return null; - } + throw new JsonSerializationException($"Could not convert string to DateTime: {reader.Value} Path {reader.Path}"); } else { - if (DateTime.TryParse((string)reader.Value, out dateTime) == false) + if (canConvert == false) { - - //throw new JsonSerializationException($"Could not convert string to DateTime: {reader.Value} Path {reader.Path}"); return null; } } - - // 将客户端时间转换为服务器时区的时间 var serverZoneTime = TimeZoneInfo.ConvertTime(dateTime, _clientTimeZone, TimeZoneInfo.Local); From f8b7e7d764e53699e2c9c52ec00ae2eb1fa2a357 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 21 Jan 2026 11:48:13 +0800 Subject: [PATCH 30/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B8=A6=E6=97=B6=E5=8C=BA=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewtonsoftJson/JSONTimeZoneConverter.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs index 6f2623694..16e4155c4 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/NewtonsoftJson/JSONTimeZoneConverter.cs @@ -90,6 +90,9 @@ namespace IRaCIS.Core.API } } + ////如果前端传递带时区的,那么转换会报错,需要DateTimeKind.Unspecified + //dateTime = DateTime.SpecifyKind(dateTime, DateTimeKind.Unspecified); + // 将客户端时间转换为服务器时区的时间 var serverZoneTime = TimeZoneInfo.ConvertTime(dateTime, _clientTimeZone, TimeZoneInfo.Local); @@ -109,6 +112,10 @@ namespace IRaCIS.Core.API DateTime clientZoneTime = TimeZoneInfo.ConvertTime(nullableDateTime.Value, _clientTimeZone); + //// 最简单的方式:创建 DateTimeOffset + //DateTimeOffset dateTimeOffset = new DateTimeOffset(clientZoneTime, _clientTimeZone.GetUtcOffset(clientZoneTime)); + //writer.WriteValue(dateTimeOffset.ToString("yyyy-MM-dd HH:mm:sszzz")); + writer.WriteValue(clientZoneTime.ToString(_dateFormat)); } else From 2ce112720ad6869af8c5a1b31155e048170f7f19 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 23 Jan 2026 13:55:20 +0800 Subject: [PATCH 31/36] =?UTF-8?q?=E6=B7=BB=E5=8A=A0IsBeMark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/DTO/NoneDicomStudyFileViewModel.cs | 2 ++ .../ReadingImageTask/ReadingNoDicomTaskService.cs | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyFileViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyFileViewModel.cs index d291fce1d..78b4e1684 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyFileViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyFileViewModel.cs @@ -20,6 +20,8 @@ namespace IRaCIS.Core.Application.Contracts public bool IsDeleted { get; set; } + public bool IsBeMark { get; set; } + public DateTime? MarkTime { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingNoDicomTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingNoDicomTaskService.cs index cc8d7e17d..14de41b22 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingNoDicomTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingNoDicomTaskService.cs @@ -485,13 +485,16 @@ namespace IRaCIS.Core.Application.Service List result = await noneDicomStudyQueryable.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync(); - + // 获取非DIOCM标记 var nonoDicomStudyFileIds = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == inDto.VisistTaskId).ToListAsync(); + + var markFileId = nonoDicomStudyFileIds.Select(x => x.NoneDicomFileId).ToList(); if (nonoDicomStudyFileIds.Count > 0 && taskinfo.ReadingTaskState == ReadingTaskState.HaveSigned) { var studyId = nonoDicomStudyFileIds.Select(x => x.StudyId).FirstOrDefault(); var noneDicomids = nonoDicomStudyFileIds.Select(x => x.NoneDicomFileId).ToList(); + var noneDicomStudyViewMark = new NoneDicomStudyView() { Id = Guid.NewGuid() }; noneDicomStudyViewMark.IsCriticalSequence = true; noneDicomStudyViewMark.NoneDicomStudyFileList = await _noneDicomStudyFileRepository.Where(x => noneDicomids.Contains(x.Id)).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); @@ -506,6 +509,14 @@ namespace IRaCIS.Core.Application.Service } + foreach (var item in result) + { + foreach (var item1 in item.NoneDicomStudyFileList) + { + item1.IsBeMark= markFileId.Contains(item1.Id); + } + } + var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new { From 6736fa96fda2160c643b9a20bc923b1e1a245838 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 23 Jan 2026 14:41:26 +0800 Subject: [PATCH 32/36] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BD=B1=E5=83=8F?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DTO/DicomSeriesModel.cs | 6 ++++++ .../Service/ImageAndDoc/SeriesService.cs | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs index 5922ef9b4..5ec4c58db 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs @@ -117,4 +117,10 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO public bool HasLabel { get; set; } = false; public bool KeySeries { get; set; } = false; } + public class UpdateImageResizeDTO + { + public Guid SeriesId { get; set; } + + public string ImageResizePath { get; set; } + } } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index 27285b3b7..59ecf2f34 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -17,7 +17,18 @@ namespace IRaCIS.Core.Application.Services { + /// + /// 更新缩略图路径 + /// + /// + /// + [HttpPost] + public async Task UpdateImageResizePath(UpdateImageResizeDTO dto) + { + await _seriesRepository.UpdatePartialFromQueryAsync(t => t.Id == dto.SeriesId, u => new DicomSeries() { ImageResizePath = dto.ImageResizePath }, true); + return ResponseOutput.Ok(); + } //医生读片那一块有耦合,关键序列 这里暂时留存 /// 指定资源Id,获取Dicom检查所属序列信息列表 From 77538ab7c2f9353d06584f5c0d8f8c6a17834c21 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 23 Jan 2026 17:40:56 +0800 Subject: [PATCH 33/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Domain/Trial/Trial.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 1ce443206..ad8f4319c 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -259,7 +259,7 @@ public partial class Trial : BaseFullDeleteAuditEntity /// 图像格式 /// [StringLength(2000)] - public List ImageFormatList { get; set; } = new List() {"jpg","jpeg","png","bmp","pdf","zip" }; + public List ImageFormatList { get; set; } = new List() {"jpg","jpeg","png","bmp","pdf","zip","mp4" }; #endregion #region 邮件配置 From 782270d4621c72837317e13a4c8354cc3eba00c3 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 26 Jan 2026 10:58:29 +0800 Subject: [PATCH 34/36] =?UTF-8?q?=E7=94=A8=E6=88=B7MFA=20=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=A2=9E=E5=8A=A0tag=EF=BC=8C=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=AF=86=E7=A0=81=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=B8=85=E6=A5=9A=E8=AF=A5tag=E7=9A=84=E7=BC=93=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E8=80=8C=E7=99=BB=E5=BD=95=E6=97=B6=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=AA=8C=E8=AF=81MFA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/CacheHelper.cs | 2 ++ IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 +++++++ .../Service/Management/UserService.cs | 13 ++++++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/CacheHelper.cs b/IRaCIS.Core.Application/Helper/CacheHelper.cs index 850d7be88..15bf0008b 100644 --- a/IRaCIS.Core.Application/Helper/CacheHelper.cs +++ b/IRaCIS.Core.Application/Helper/CacheHelper.cs @@ -64,6 +64,8 @@ public static class CacheKeys //每个用户 每个浏览器独立时间 public static string UserMFAVerifyPass(Guid userId,string browserFingerprint) => $"UserMFAVerifyPass:{userId}:{browserFingerprint}"; + public static string UserMFATag(Guid userId) => $"UserMFAVerifyPass:{userId}"; + } public static class CacheHelper diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index c088abee4..4dcc59184 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -19195,6 +19195,13 @@ + + + 更新缩略图路径 + + + + 指定资源Id,获取Dicom检查所属序列信息列表 Dicom检查的Id diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index bb5a73685..62d89c426 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -308,6 +308,8 @@ namespace IRaCIS.Core.Application.Service await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(userName)); + await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(identityUserId)); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.ResetPassword }, true); return ResponseOutput.Ok(); @@ -316,7 +318,7 @@ namespace IRaCIS.Core.Application.Service /// - /// 重置密码发邮件 (未登陆修改) + /// 重置密码发邮件 (未登陆修改-忘记密码) /// /// /// @@ -357,6 +359,8 @@ namespace IRaCIS.Core.Application.Service await _mailVerificationService.AnolymousSendEmailForResetAccount(email, verificationCode); + await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(existUser.Id)); + return ResponseOutput.Ok(); } @@ -485,6 +489,8 @@ namespace IRaCIS.Core.Application.Service await _mailVerificationService.AfterUserModifyPasswordSendEmailAsync(_userInfo.IdentityUserId); + await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(_userInfo.IdentityUserId)); + return ResponseOutput.Result(success); @@ -861,7 +867,8 @@ namespace IRaCIS.Core.Application.Service if (isRemember) { - await _fusionCache.SetAsync(CacheKeys.UserMFAVerifyPass(identityUserId, _userInfo.BrowserFingerprint), _userInfo.BrowserFingerprint, TimeSpan.FromMinutes(_serviceVerifyConfigConfig.UserMFAVerifyMinutes)); + await _fusionCache.SetAsync(CacheKeys.UserMFAVerifyPass(identityUserId, _userInfo.BrowserFingerprint), _userInfo.BrowserFingerprint, + TimeSpan.FromMinutes(_serviceVerifyConfigConfig.UserMFAVerifyMinutes), new[] { CacheKeys.UserMFATag(identityUserId) }); Log.Logger.Warning($"MFA登录记录:{_userInfo.UserName} 浏览器标识: {_userInfo.BrowserFingerprint} 设置缓存分钟{_serviceVerifyConfigConfig.UserMFAVerifyMinutes}"); } @@ -1176,7 +1183,7 @@ namespace IRaCIS.Core.Application.Service if (_verifyConfig.CurrentValue.OpenLoginMFA) { - + if ((await _fusionCache.GetOrDefaultAsync(CacheKeys.UserMFAVerifyPass(identityUserId, _userInfo.BrowserFingerprint), "")) == _userInfo.BrowserFingerprint) { userLoginReturnModel.IsMFA = false; From c814736427cab2ed9e67dcbe66d0a5c38e1528ff Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 26 Jan 2026 16:13:02 +0800 Subject: [PATCH 35/36] =?UTF-8?q?=E4=BC=98=E5=8C=96dron=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=AD=A5=E9=AA=A4=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=80=E4=B8=8B=E5=AD=90=E8=B4=9F?= =?UTF-8?q?=E8=BD=BD=E8=BF=87=E5=A4=A7=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/UserService.cs | 2 +- irc_api.drone.yml | 67 ++++--------------- 2 files changed, 13 insertions(+), 56 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 62d89c426..05f9a0cae 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -1073,7 +1073,7 @@ namespace IRaCIS.Core.Application.Service //异地登录 loginUser.LoginState = 2; - + await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(loginUser.IdentityUserId)); } } } diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 9b8eba609..3532380ce 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -48,29 +48,6 @@ steps: commands: - cd /opt/1panel/xc-deploy/Test_IRC/devops-build-publish;sh test-irc-update-or-create-stack.sh v${DRONE_BUILD_NUMBER} -trigger: - branch: - - Test_IRC_Net8 - ---- -kind: pipeline -type: ssh -name: ssh-linux-test-irc-scp-publish - -platform: - os: Linux - arch: 386 - -clone: - disable: true - -server: - host: 106.14.89.110 - user: root - password: - from_secret: test_ssh_pwd - -steps: - name: publish-test-irc-scp commands: - cd /opt/1panel/xc-deploy/Test_IRC_SCP/devops-build-publish;sh pull-build-test-irc-scp-image.sh v${DRONE_BUILD_NUMBER} @@ -78,7 +55,9 @@ steps: trigger: branch: - - Test_IRC_Net8—_SCP_Disable + - Test_IRC_Net8 + + --- kind: pipeline @@ -111,37 +90,7 @@ trigger: --- kind: pipeline type: ssh -name: ssh-linux-test-scp-publish - -platform: - os: Linux - arch: 386 - -clone: - disable: true #禁用默认克隆 - -server: - host: 106.14.89.110 - user: root - password: - from_secret: test_ssh_pwd - -steps: -- name: publish-test-hir-scp - commands: - - cd /opt/1panel/xc-deploy/Test_HIR_SCP/devops-build-publish;sh pull-build-test-hir-scp-image.sh v${DRONE_BUILD_NUMBER} - - cd /opt/1panel/xc-deploy/Test_HIR_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} -trigger: - branch: - - Test_HIR - - ---- - - -kind: pipeline -type: ssh -name: ssh-linux-test-hir-publish +name: ssh-linux-test-hir platform: os: Linux @@ -161,8 +110,16 @@ steps: commands: - cd /opt/1panel/xc-deploy/Test_HIR/devops-build-publish;sh pull-build-test-hir-image.sh v${DRONE_BUILD_NUMBER} - cd /opt/1panel/xc-deploy/Test_HIR ; sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} + +- name: publish-test-hir-scp + commands: + - cd /opt/1panel/xc-deploy/Test_HIR_SCP/devops-build-publish;sh pull-build-test-hir-scp-image.sh v${DRONE_BUILD_NUMBER} + - cd /opt/1panel/xc-deploy/Test_HIR_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} trigger: branch: - Test_HIR + + + \ No newline at end of file From 71217999005ce72bde50f21463aefcb8622bf952 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 26 Jan 2026 16:31:46 +0800 Subject: [PATCH 36/36] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=BF=98=E8=AE=B0?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=90=8E=E9=87=8D=E7=BD=AE=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=AC=A1=E6=95=B0=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/UserService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 05f9a0cae..0c0f54c33 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -442,6 +442,10 @@ namespace IRaCIS.Core.Application.Service await _mailVerificationService.AfterUserModifyPasswordSendEmailAsync(identityUserId); + + var find = await _identityUserRepository.FindAsync(identityUserId); + await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(find.UserName)); + return ResponseOutput.Ok(); }