diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 6e0f90f53..f9ea4747d 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1715,6 +1715,37 @@
+
+
+ 项目历史记录文件服务
+
+
+
+
+ 项目历史记录文件服务
+
+
+
+
+ 获取稽查记录文件列表
+
+
+
+
+
+
+ 新增或修改稽查记录文件
+
+
+
+
+
+
+ 删除稽查记录文件
+
+
+
+
项目-一般文件记录
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs
index 207e96681..083d65d6c 100644
--- a/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs
@@ -14,7 +14,9 @@ namespace IRaCIS.Core.Application.ViewModel;
public class TrialFinalRecordView : TrialFinalRecordAddOrEdit
{
-
+ public int HistoryCount { get; set; }
+
+
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialHistoryRecordFileViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialHistoryRecordFileViewModel.cs
new file mode 100644
index 000000000..3a268ab19
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialHistoryRecordFileViewModel.cs
@@ -0,0 +1,56 @@
+
+//--------------------------------------------------------------------
+// 此代码由liquid模板自动生成 byzhouhang 20240909
+// 生成时间 2025-06-09 02:09:12Z
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+//--------------------------------------------------------------------
+using System;
+using IRaCIS.Core.Domain.Share;
+using System.Collections.Generic;
+namespace IRaCIS.Core.Application.Service.DTO;
+
+public class TrialHistoryRecordFileView : TrialHistoryRecordFileAddOrEdit
+{
+
+ public DateTime CreateTime { get; set; }
+
+ public DateTime UpdateTime { get; set; }
+
+}
+
+
+public class TrialHistoryRecordFileAddOrEdit
+{
+ public Guid? Id { get; set; }
+
+ public string FileFormat { get; set; }
+
+ public string FileName { get; set; }
+
+ public string FilePath { get; set; }
+
+ public string FileSize { get; set; }
+
+ public Guid TrialFileTypeId { get; set; }
+
+ public Guid TrialRecordId { get; set; }
+ }
+
+public class TrialHistoryRecordFileQuery:PageInput
+{
+ public string? FileFormat { get; set; }
+
+ public string? FileName { get; set; }
+
+ public string? FilePath { get; set; }
+
+ public string? FileSize { get; set; }
+
+ public Guid? TrialFileTypeId { get; set; }
+
+ public Guid? TrialRecordId { get; set; }
+ }
+
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialNormalRecordViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialNormalRecordViewModel.cs
index 2163a4b89..ad5d0d316 100644
--- a/IRaCIS.Core.Application/Service/Document/DTO/TrialNormalRecordViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialNormalRecordViewModel.cs
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.ViewModel;
public class TrialNormalRecordView : TrialNormalRecordAddOrEdit
{
-
+ public int HistoryCount { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialTrianingRecordViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialTrianingRecordViewModel.cs
index 2f43bf7ae..b60fc615c 100644
--- a/IRaCIS.Core.Application/Service/Document/DTO/TrialTrianingRecordViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialTrianingRecordViewModel.cs
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.ViewModel;
public class TrialTrianingRecordView : TrialTrianingRecordAddOrEdit
{
-
+ public int HistoryCount { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Document/Interface/ITrialHistoryRecordFileService.cs b/IRaCIS.Core.Application/Service/Document/Interface/ITrialHistoryRecordFileService.cs
new file mode 100644
index 000000000..0e7115365
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Document/Interface/ITrialHistoryRecordFileService.cs
@@ -0,0 +1,23 @@
+
+//--------------------------------------------------------------------
+// 此代码由liquid模板自动生成 byzhouhang 20240909
+// 生成时间 2025-06-09 02:09:12Z
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+//--------------------------------------------------------------------
+using System;
+using IRaCIS.Core.Infrastructure.Extention;
+using System.Threading.Tasks;
+using IRaCIS.Core.Application.Service.DTO;
+namespace IRaCIS.Core.Application.Interfaces;
+
+public interface ITrialHistoryRecordFileService
+{
+
+ Task> GetTrialHistoryRecordFileList(TrialHistoryRecordFileQuery inQuery);
+
+ Task AddOrUpdateTrialHistoryRecordFile(TrialHistoryRecordFileAddOrEdit addOrEditTrialHistoryRecordFile);
+
+ Task DeleteTrialHistoryRecordFile(Guid trialHistoryRecordFileId);
+}
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/TrialHistoryRecordFileService.cs b/IRaCIS.Core.Application/Service/Document/TrialHistoryRecordFileService.cs
new file mode 100644
index 000000000..bfa69f3a6
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Document/TrialHistoryRecordFileService.cs
@@ -0,0 +1,78 @@
+
+//--------------------------------------------------------------------
+// 此代码由liquid模板自动生成 byzhouhang 20240909
+// 生成时间 2025-06-09 02:09:09Z
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+//--------------------------------------------------------------------
+using IRaCIS.Core.Domain.Models;
+using Microsoft.AspNetCore.Mvc;
+using IRaCIS.Core.Application.Interfaces;
+using IRaCIS.Core.Infrastructure.Extention;
+using System.Threading.Tasks;
+using IRaCIS.Core.Infra.EFCore;
+using IRaCIS.Core.Application.Service.DTO;
+namespace IRaCIS.Core.Application.Service;
+
+///
+/// 项目历史记录文件服务
+///
+[ApiExplorerSettings(GroupName = "FileRecord")]
+public class TrialHistoryRecordFileService(IRepository _trialHistoryRecordFileRepository,
+ IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService, ITrialHistoryRecordFileService
+{
+
+ ///
+ /// 获取稽查记录文件列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetTrialHistoryRecordFileList(TrialHistoryRecordFileQuery inQuery)
+ {
+
+ var trialHistoryRecordFileQueryable =_trialHistoryRecordFileRepository
+ .WhereIf(inQuery.TrialRecordId!=null,x=>x.TrialRecordId==inQuery.TrialRecordId)
+ .WhereIf(inQuery.TrialFileTypeId != null, x => x.TrialFileTypeId == inQuery.TrialFileTypeId)
+ .WhereIf(inQuery.FileName.IsNotNullOrEmpty(), x => x.FileName.Contains(x.FileName))
+ .ProjectTo(_mapper.ConfigurationProvider);
+
+ var pageList= await trialHistoryRecordFileQueryable.ToPagedListAsync(inQuery);
+
+ return pageList;
+ }
+
+ ///
+ /// 新增或修改稽查记录文件
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task AddOrUpdateTrialHistoryRecordFile(TrialHistoryRecordFileAddOrEdit addOrEditTrialHistoryRecordFile)
+ {
+ // 在此处拷贝automapper 映射
+
+
+
+
+ var entity = await _trialHistoryRecordFileRepository.InsertOrUpdateAsync(addOrEditTrialHistoryRecordFile, true);
+
+ return ResponseOutput.Ok(entity.Id.ToString());
+
+ }
+
+ ///
+ /// 删除稽查记录文件
+ ///
+ ///
+ ///
+ [HttpDelete("{trialHistoryRecordFileId:guid}")]
+ public async Task DeleteTrialHistoryRecordFile(Guid trialHistoryRecordFileId)
+ {
+ var success = await _trialHistoryRecordFileRepository.DeleteFromQueryAsync(t => t.Id == trialHistoryRecordFileId,true);
+ return ResponseOutput.Ok();
+ }
+
+}
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
index 5dd481295..a5738ef67 100644
--- a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
@@ -2,6 +2,7 @@
using AutoMapper.EquivalencyExpression;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Contracts;
+using IRaCIS.Core.Application.Service.DTO;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure.Extention;
@@ -124,7 +125,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap().ReverseMap();
- CreateMap();
+ CreateMap()
+ .ForMember(d => d.HistoryCount, c => c.MapFrom(t => t.TrialHistoryRecordFileList.Count));
CreateMap();
//.ForMember(d => d.HistoryFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId))
//.ForMember(d => d.SignFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId))
@@ -132,15 +134,18 @@ namespace IRaCIS.Core.Application.Service
//.ForMember(d => d.PDFFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId));
CreateMap()
+ .ForMember(d => d.HistoryCount, c => c.MapFrom(t => t.TrialHistoryRecordFileList.Count))
.ForMember(d => d.FileName, c => c.MapFrom(t => t.TrialFileRecord.FileName));
CreateMap().ReverseMap();
CreateMap()
+ .ForMember(d => d.HistoryCount, c => c.MapFrom(t => t.TrialHistoryRecordFileList.Count))
.ForMember(d => d.FileName, c => c.MapFrom(t => t.TrialFileRecord.FileName));
CreateMap().ReverseMap();
-
+ CreateMap();
+ CreateMap().ReverseMap();
}
}
diff --git a/IRaCIS.Core.Domain/FileRecord/FileType.cs b/IRaCIS.Core.Domain/FileRecord/FileType.cs
index f6b330ff7..32c6dbb29 100644
--- a/IRaCIS.Core.Domain/FileRecord/FileType.cs
+++ b/IRaCIS.Core.Domain/FileRecord/FileType.cs
@@ -101,7 +101,9 @@ public enum SubIdentification
}
-
+///
+/// 文件类型表 就是5类里面的各个小项 如( 报告里面的 项目总结报告,一致性分析报告...... 文档里面的 项目合同.......)
+///
[Comment("后台 - 系统文件类型表")]
[Table("SysFileType")]
public class SysFileType : BaseFullAuditEntity
@@ -135,6 +137,10 @@ public class SysFileType : BaseFullAuditEntity
}
+
+///
+/// 文件类型表 就是5类里面的各个小项 如( 报告里面的 项目总结报告,一致性分析报告...... 文档里面的 项目合同.......)
+///
[Comment("项目文件 - 文件类型表")]
[Table("TrialFileType")]
public class TrialFileType : BaseFullAuditEntity
diff --git a/IRaCIS.Core.Domain/FileRecord/TrialRecord.cs b/IRaCIS.Core.Domain/FileRecord/TrialRecord.cs
index f8556770d..47f02ed1f 100644
--- a/IRaCIS.Core.Domain/FileRecord/TrialRecord.cs
+++ b/IRaCIS.Core.Domain/FileRecord/TrialRecord.cs
@@ -41,6 +41,14 @@ public class TrialFinalRecord : BaseFullAuditEntity
[JsonIgnore]
[ForeignKey("HistoryFileRecordId")]
public TrialFile HistoryFileRecord { get; set; }
+
+
+ ///
+ /// 历史记录
+ ///
+ [JsonIgnore]
+ public List TrialHistoryRecordFileList { get; set; }
+
#endregion
@@ -89,6 +97,11 @@ public class TrialNormalRecord : BaseFullAuditEntity
{
public Guid TrialId { get; set; }
+ ///
+ /// 历史记录
+ ///
+ [JsonIgnore]
+ public List TrialHistoryRecordFileList { get; set; }
///
/// 一般文件记录
@@ -140,6 +153,13 @@ public class TrialTrianingRecord : BaseFullAuditEntity
[ForeignKey("TrialFileRecordId")]
public TrialFile TrialFileRecord { get; set; }
+
+ ///
+ /// 历史记录
+ ///
+ [JsonIgnore]
+ public List TrialHistoryRecordFileList { get; set; }
+
///
/// 历史文件记录
///
@@ -183,7 +203,6 @@ public class TrialTrianingRecord : BaseFullAuditEntity
[Table("TrialFile")]
public class TrialFile : BaseFullAuditEntity
{
-
///
/// TrialFinalRecord
///
@@ -202,7 +221,48 @@ public class TrialFile : BaseFullAuditEntity
public string FileSize { get; set; }
public string FileFormat { get; set; }
-
-
-
+}
+
+///
+/// 项目历史记录文件表
+///
+public class TrialHistoryRecordFile : BaseFullAuditEntity
+{
+ #region MyRegion
+ ///
+ /// TrialFinalRecord
+ ///
+ [JsonIgnore]
+ [ForeignKey("TrialFileTypeId")]
+ public TrialFileType TrialFileType { get; set; }
+
+ [JsonIgnore]
+ [ForeignKey("TrialRecordId")]
+ public TrialFinalRecord? TrialFinalRecord { get; set; }
+
+ [JsonIgnore]
+ [ForeignKey("TrialRecordId")]
+ public TrialNormalRecord? TrialNormalRecord { get; set; }
+
+ [JsonIgnore]
+ [ForeignKey("TrialRecordId")]
+ public TrialTrianingRecord? TrialTrianingRecord { get; set; }
+ #endregion
+
+ ///
+ /// 项目记录Id (TrialFinalRecord,TrialNormalRecord,TrialTrianingRecord)
+ ///
+ public Guid TrialRecordId { get; set; }
+
+ [Comment("关联项目文件类型")]
+ public Guid TrialFileTypeId { get; set; }
+
+ public string FileName { get; set; }
+
+ [StringLength(1000)]
+ public string FilePath { get; set; }
+
+ public string FileSize { get; set; }
+
+ public string FileFormat { get; set; }
}
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index ed5b96857..9b5873c25 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -659,6 +659,8 @@ public class IRaCISDBContext : DbContext
public virtual DbSet TrialNormalRecord { get; set; }
public virtual DbSet TrialTrianingRecord { get; set; }
public virtual DbSet TrialFile { get; set; }
+
+ public virtual DbSet TrialHistoryRecordFile { get; set; }
#endregion
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250609020749_TrialHistoryRecordFile.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250609020749_TrialHistoryRecordFile.Designer.cs
new file mode 100644
index 000000000..7c479d4bc
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250609020749_TrialHistoryRecordFile.Designer.cs
@@ -0,0 +1,19730 @@
+//
+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("20250609020749_TrialHistoryRecordFile")]
+ partial class TrialHistoryRecordFile
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.15")
+ .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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("DoctorId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("AuditDocument", t =>
+ {
+ t.HasComment("稽查文档管理");
+ });
+ });
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectVisitId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SystemClinicalDataSetId");
+
+ b.HasIndex("TrialId");
+
+ 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");
+
+ b.HasIndex("ClinicalDataTrialSetId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectId");
+
+ 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");
+
+ b.HasIndex("ClinicalFormId");
+
+ b.HasIndex("CreateUserId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("RowId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CommonDocument", 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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("CriterionId");
+
+ 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");
+
+ b.HasIndex("CreateUserId");
+
+ 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("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");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("TrialReadingCriterionId");
+
+ b.HasIndex("VisitTaskId");
+
+ b.ToTable("DataInspection", t =>
+ {
+ t.HasComment("稽查 - 记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Anonymize")
+ .HasColumnType("bit");
+
+ b.Property("CPIStatus")
+ .HasColumnType("bit");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("FrameOfReferenceUID")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("HtmlPath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageColumns")
+ .HasColumnType("int");
+
+ 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("IsReading")
+ .HasColumnType("bit");
+
+ b.Property("NumberOfFrames")
+ .HasColumnType("int");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("PixelSpacing")
+ .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("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ 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("SeqId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SeriesId");
+
+ b.HasIndex("StudyId");
+
+ b.ToTable("DicomInstance", t =>
+ {
+ t.HasComment("归档 - Instance表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ 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("Id")
+ .HasColumnType("uniqueidentifier");
+
+ 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