From a03d7f55c788bfff33106f7908a000f32aa2edc7 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Thu, 27 Mar 2025 15:48:33 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 47 +
.../Service/Document/AuditDocumentService.cs | 298 +
.../Document/DTO/AuditDocumentViewModel.cs | 130 +
.../Service/Document/_MapConfig.cs | 4 +-
IRaCIS.Core.Domain/Document/AuditDocument.cs | 83 +
.../Context/IRaCISDBContext.cs | 2 +
.../20250327060052_AuditDocument.Designer.cs | 19234 ++++++++++++++++
.../20250327060052_AuditDocument.cs | 58 +
...250327074301_AuditDocumenttype.Designer.cs | 19234 ++++++++++++++++
.../20250327074301_AuditDocumenttype.cs | 28 +
.../IRaCISDBContextModelSnapshot.cs | 72 +
11 files changed, 39189 insertions(+), 1 deletion(-)
create mode 100644 IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs
create mode 100644 IRaCIS.Core.Application/Service/Document/DTO/AuditDocumentViewModel.cs
create mode 100644 IRaCIS.Core.Domain/Document/AuditDocument.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20250327060052_AuditDocument.Designer.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20250327060052_AuditDocument.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20250327074301_AuditDocumenttype.Designer.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20250327074301_AuditDocumenttype.cs
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 30bf040a5..c25c7fc20 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1383,6 +1383,53 @@
+
+
+ 获取稽查文档
+
+
+
+
+
+
+ 新增或者修改稽查文档
+
+
+
+
+
+
+ 获取文件树形结构 (传Id 根节点就是自己)
+
+
+
+
+
+
+ 删除稽查文档
+
+
+
+
+
+
+ 移动文件或者文件夹 到其他文件夹
+
+
+
+
+
+ 获取历史版本
+
+
+
+
+
+
+ 把历史版本设置为当前版本
+
+
+
系统文件类型
diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs
new file mode 100644
index 000000000..87e4398ca
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs
@@ -0,0 +1,298 @@
+
+//--------------------------------------------------------------------
+// 此代码由liquid模板自动生成 byzhouhang 20240909
+// 生成时间 2025-03-27 06:13:33Z
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+//--------------------------------------------------------------------
+using IRaCIS.Core.Domain.Models;
+using Microsoft.AspNetCore.Mvc;
+using IRaCIS.Core.Application.Interfaces;
+using IRaCIS.Core.Application.ViewModel;
+using IRaCIS.Core.Infrastructure.Extention;
+using System.Threading.Tasks;
+using IRaCIS.Core.Infra.EFCore;
+using AutoMapper.Execution;
+using System.Linq;
+using IRaCIS.Core.Infrastructure;
+using DocumentFormat.OpenXml.Office2010.Excel;
+namespace IRaCIS.Core.Application.Service;
+
+
+[ ApiExplorerSettings(GroupName = "Test")]
+public class AuditDocumentService(IRepository _auditDocumentRepository,
+ IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService
+{
+
+ ///
+ /// 获取稽查文档
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetAuditDocumentList(AuditDocumentQuery inQuery)
+ {
+ var auditDocumentQueryable =_auditDocumentRepository
+ .ProjectTo(_mapper.ConfigurationProvider);
+ var pageList= await auditDocumentQueryable.ToPagedListAsync(inQuery);
+
+ return pageList;
+ }
+
+ ///
+ /// 新增或者修改稽查文档
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task AddOrUpdateAuditDocument(AuditDocumentAddOrEdit inDto)
+ {
+ if (inDto.ParentId != null)
+ {
+ var alikeData = await _auditDocumentRepository.Where(x => x.ParentId == inDto.ParentId&&x.Name==inDto.Name&&x.AuditDocumentTypeEnum==inDto.AuditDocumentTypeEnum).FirstOrDefaultAsync();
+ if (alikeData != null)
+ {
+ if (inDto.AuditDocumentTypeEnum == AuditDocumentType.Folder)
+ {
+ throw new BusinessValidationFailedException(_localizer["AuditDocument_CanNotAddFolder"]);
+ }
+ else
+ {
+ var entityData = await _auditDocumentRepository.InsertOrUpdateAsync(inDto, true);
+
+ var historicalVersionIds = await _auditDocumentRepository.Where(x => x.MainFileId == alikeData.Id).OrderBy(x => x.Version).Select(x => x.Id).ToListAsync();
+
+ historicalVersionIds.Add(alikeData.Id);
+
+ int num = 1;
+ foreach (var item in historicalVersionIds)
+ {
+ await _auditDocumentRepository.UpdatePartialFromQueryAsync(item, x => new AuditDocument()
+ {
+ MainFileId = entityData.Id,
+ ParentId = null,
+ Version = num,
+ AuditDocumentTypeEnum = AuditDocumentType.HistoricalVersion
+ });
+ }
+
+ return ResponseOutput.Ok(entityData.Id.ToString());
+ }
+ }
+ }
+
+ var entity = await _auditDocumentRepository.InsertOrUpdateAsync(inDto, true);
+ return ResponseOutput.Ok(entity.Id.ToString());
+ }
+
+ // ///
+ // /// 删除稽查文档
+ // ///
+ // ///
+ // ///
+ // [HttpDelete("{auditDocumentId:guid}")]
+ // public async Task DeleteAuditDocument(Guid auditDocumentId)
+ //{
+ // var success = await _auditDocumentRepository.DeleteFromQueryAsync(t => t.Id == auditDocumentId,true);
+ // return ResponseOutput.Ok();
+ //}
+
+ ///
+ /// 获取文件树形结构 (传Id 根节点就是自己)
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task GetAuditDocumentData(GetAuditDocumentDataInDto inDto)
+ {
+ var data= await _auditDocumentRepository
+ .Where(x=>x.AuditDocumentTypeEnum!=AuditDocumentType.HistoricalVersion)
+ .WhereIf(inDto.IsAuthorization!=null,x=>x.IsAuthorization==inDto.IsAuthorization).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+
+ var root= data
+ .WhereIf(inDto.Id!= null, x => x.Id == inDto.Id)
+ .WhereIf(inDto.Id==null,x=>x.ParentId==null).ToList();
+
+ foreach (var item in root)
+ {
+ GetChildren(item, data);
+
+ }
+
+ return new GetAuditDocumentDataOutDto()
+ {
+ Data = root
+ };
+
+ }
+
+ private void GetChildren(AuditDocumentData item, List dataList)
+ {
+ item.Children = dataList.Where(x => x.ParentId == item.Id).ToList();
+ foreach (var x in item.Children)
+ {
+ GetChildren(x, dataList);
+ }
+ }
+
+ ///
+ /// 删除稽查文档
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task DeleteAuditDocument(DeleteAuditDocumentInDto inDto)
+ {
+ var data = await _auditDocumentRepository.Select(x => new DeleteAudit (){
+ Id=x.Id,
+ ParentId= x.ParentId,
+ MainFileId= x.MainFileId
+ }).ToListAsync();
+
+ List DeleteId= inDto.Ids;
+
+ finId(inDto.Ids, data);
+
+ void finId(List deletids, List deletes)
+ {
+ DeleteId.AddRange(deletids);
+
+ var temp = deletes.Where(x => deletids.Contains(x.ParentId.Value)|| deletids.Contains(x.MainFileId.Value)).Select(x => x.Id).ToList();
+ if (temp.Count() > 0)
+ {
+ finId(temp, deletes);
+ }
+ }
+
+ var success = await _auditDocumentRepository.DeleteFromQueryAsync(t => DeleteId.Contains(t.Id), true);
+ return ResponseOutput.Ok();
+
+
+ }
+
+ ///
+ /// 移动文件或者文件夹 到其他文件夹
+ ///
+ ///
+ [HttpPost]
+ public async Task MovieFileOrFolder(MovieFileOrFolderInDto inDto)
+ {
+ var file = await _auditDocumentRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
+ if (file.AuditDocumentTypeEnum == AuditDocumentType.Folder)
+ {
+ var data = await _auditDocumentRepository.Select(x => new DeleteAudit()
+ {
+ Id = x.Id,
+ ParentId = x.ParentId,
+ MainFileId = x.MainFileId
+ }).ToListAsync();
+ if (finChild(new List { inDto.Id }, inDto.ParentId, data))
+ {
+ throw new BusinessValidationFailedException(_localizer["AuditDocument_CanNotMove"]);
+ }
+
+ }
+
+ bool finChild(List ids, Guid ChildId,List data)
+ {
+ var child = data.Where(x =>x.ParentId!=null&& ids.Contains(x.ParentId.Value)).ToList();
+ if (child.Count() == 0)
+ {
+ return false;
+ }
+ else if (child.Any(x => x.Id == ChildId))
+ {
+ return true;
+ }
+ else
+ {
+ var newids = child.Select(x => x.Id).ToList();
+
+ return finChild(newids, ChildId, data);
+
+ }
+ }
+
+ await _auditDocumentRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new AuditDocument()
+ {
+ ParentId = inDto.ParentId
+ });
+
+ await _auditDocumentRepository.SaveChangesAsync();
+ return ResponseOutput.Ok();
+ }
+
+
+ ///
+ /// 获取历史版本
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task GetHistoricalVersion(GetHistoricalVersionInDto inDto)
+ {
+ return new GetHistoricalVersionOutDto()
+ {
+
+ CurrentData = await _auditDocumentRepository.Where(x => x.Id == inDto.Id).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(),
+ HistoricalVersionList = await _auditDocumentRepository.Where(x => x.MainFileId == inDto.Id).ProjectTo(_mapper.ConfigurationProvider).OrderByDescending(x => x.Version).ToListAsync()
+ };
+ }
+
+ ///
+ /// 把历史版本设置为当前版本
+ ///
+ ///
+ [HttpPost]
+ public async Task SetCurrentVersion(SetCurrentVersionInDto inDto)
+ {
+ var file = await _auditDocumentRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
+ if (file.AuditDocumentTypeEnum != AuditDocumentType.HistoricalVersion)
+ {
+ throw new BusinessValidationFailedException(_localizer["AuditDocument_CanNotSetCurrentVersion"]);
+ }
+
+ var mainFile = await _auditDocumentRepository.Where(x => x.Id == file.MainFileId).FirstNotNullAsync();
+
+ var historicalVersionIds= await _auditDocumentRepository.Where(x => x.MainFileId == mainFile.Id&&x.Id!=inDto.Id).OrderBy(x=>x.Version).Select(x=>x.Id).ToListAsync();
+
+ historicalVersionIds.Add(mainFile.Id);
+ await _auditDocumentRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new AuditDocument() {
+ MainFileId=null,
+ ParentId= mainFile.ParentId,
+ AuditDocumentTypeEnum=AuditDocumentType.File,
+ });
+
+ int num = 1;
+ foreach (var item in historicalVersionIds)
+ {
+ await _auditDocumentRepository.UpdatePartialFromQueryAsync(item, x => new AuditDocument()
+ {
+ MainFileId = inDto.Id,
+ ParentId = null,
+ Version=num,
+ AuditDocumentTypeEnum= AuditDocumentType.HistoricalVersion
+ });
+ }
+
+ await _auditDocumentRepository.SaveChangesAsync();
+
+
+ return ResponseOutput.Ok();
+
+ }
+
+ /////
+ ///// 设置是否授权
+ /////
+ /////
+ /////
+ //[ht]
+ // public async Task SetIsAuthorization(SetIsAuthorizationInDto inDto)
+ //{
+
+ //}
+
+}
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/AuditDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/AuditDocumentViewModel.cs
new file mode 100644
index 000000000..fab7163f6
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Document/DTO/AuditDocumentViewModel.cs
@@ -0,0 +1,130 @@
+
+//--------------------------------------------------------------------
+// 此代码由liquid模板自动生成 byzhouhang 20240909
+// 生成时间 2025-03-27 06:13:37Z
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+//--------------------------------------------------------------------
+using System;
+using IRaCIS.Core.Domain.Share;
+using System.Collections.Generic;
+namespace IRaCIS.Core.Application.ViewModel;
+
+public class DeleteAudit
+{
+ public Guid Id { get; set; }
+
+ public Guid? ParentId { get; set; }
+
+ public Guid? MainFileId { get; set; }
+}
+
+public class DeleteAuditDocumentInDto
+{
+ public List Ids { get; set; }
+}
+
+public class GetAuditDocumentDataInDto
+{
+ public Guid? Id { get; set; }
+
+ public bool? IsAuthorization { get; set; }
+}
+
+public class GetAuditDocumentDataOutDto
+{
+ public List Data { get; set; } = new List { };
+}
+
+public class AuditDocumentData : AuditDocumentView
+{
+ public int? Version { get; set; }
+ public List Children { get; set; }=new List (){ };
+
+}
+
+public class AuditDocumentView : AuditDocumentAddOrEdit
+{
+
+ public DateTime CreateTime { get; set; }
+
+ public DateTime UpdateTime { get; set; }
+
+}
+
+public class SetIsAuthorizationInDto
+{
+ public List Ids { get; set; }
+
+ public bool IsAuthorization { get; set; }
+}
+
+public class SetCurrentVersionInDto
+{
+ public Guid Id { get; set; }
+}
+
+public class GetHistoricalVersionInDto
+{
+ public Guid Id { get; set; }
+}
+
+public class GetHistoricalVersionOutDto
+{
+ public AuditDocumentData CurrentData { get; set; }
+ public List HistoricalVersionList { get; set; } = new List { };
+}
+
+public class MovieFileOrFolderInDto
+{
+ public Guid Id { get; set; }
+
+ public Guid ParentId { get; set; }
+}
+
+
+public class AuditDocumentAddOrEdit
+{
+ public Guid? Id { get; set; }
+
+ public AuditDocumentType AuditDocumentTypeEnum { get; set; }
+
+ public string FileFormat { get; set; }
+
+ public string FilePath { get; set; }
+
+ public decimal? FileSize { get; set; }
+
+ public bool IsAuthorization { get; set; }
+
+ // public Guid? MainFileId { get; set; }
+
+ public string Name { get; set; }
+
+ public Guid? ParentId { get; set; }
+
+ //public int? Version { get; set; }
+ }
+
+public class AuditDocumentQuery:PageInput
+{
+ public AuditDocumentType? AuditDocumentEnum { get; set; }
+
+ public string? FileFormat { get; set; }
+
+ public string? FilePath { get; set; }
+
+ public decimal? FileSize { get; set; }
+
+ public bool? IsAuthorization { get; set; }
+
+ public Guid? MainFileId { get; set; }
+
+ public string? Name { get; set; }
+
+ public Guid? ParentId { get; set; }
+
+ }
+
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
index 6d5507291..d146db4aa 100644
--- a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs
@@ -14,7 +14,9 @@ namespace IRaCIS.Core.Application.Service
var userId = Guid.Empty;
var isEn_Us = false;
-
+ CreateMap();
+ CreateMap();
+ CreateMap().ReverseMap();
CreateMap()
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
diff --git a/IRaCIS.Core.Domain/Document/AuditDocument.cs b/IRaCIS.Core.Domain/Document/AuditDocument.cs
new file mode 100644
index 000000000..cbd69071a
--- /dev/null
+++ b/IRaCIS.Core.Domain/Document/AuditDocument.cs
@@ -0,0 +1,83 @@
+using IRaCIS.Core.Domain.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Domain.Models
+{
+ [Comment("稽查文档管理")]
+ [Table("AuditDocument")]
+ public class AuditDocument : BaseFullAuditEntity
+ {
+
+ ///
+ /// 文件夹名或者文件名
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// 文档类型
+ ///
+ public AuditDocumentType AuditDocumentTypeEnum { get; set; }
+
+ ///
+ /// 父文件夹Id
+ ///
+ public Guid? ParentId { get; set; }
+
+ ///
+ /// 文件路径
+ ///
+ [StringLength(1000)]
+ public string FilePath { get; set; } = string.Empty;
+
+ ///
+ /// 文件大小
+ ///
+ public decimal? FileSize { get; set; }
+
+ ///
+ /// 文件类型
+ ///
+ public string FileFormat { get; set; } = string.Empty;
+
+ ///
+ /// 版本
+ ///
+ public int? Version { get; set; }
+
+ ///
+ /// 主文件Id
+ ///
+ public Guid? MainFileId { get; set; }
+
+ ///
+ /// 是否授权
+ ///
+ public bool IsAuthorization { get; set; } = false;
+ }
+
+ ///
+ /// 稽查文档类型
+ ///
+ public enum AuditDocumentType
+ {
+ ///
+ /// 文件夹
+ ///
+ Folder = 0,
+
+ ///
+ /// 文件
+ ///
+ File = 1,
+
+ ///
+ /// 历史版本
+ ///
+ HistoricalVersion = 2,
+
+ }
+}
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index a19e4723c..5fdc7b1ce 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -648,6 +648,8 @@ public class IRaCISDBContext : DbContext
#region 报告、 文档、记录
+ public virtual DbSet AuditDocument { get; set; }
+
public virtual DbSet SysFileType { get; set; }
public virtual DbSet TrialFileType { get; set; }
public virtual DbSet TrialFinalRecord { get; set; }
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250327060052_AuditDocument.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250327060052_AuditDocument.Designer.cs
new file mode 100644
index 000000000..9ed31bf88
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250327060052_AuditDocument.Designer.cs
@@ -0,0 +1,19234 @@
+//
+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("20250327060052_AuditDocument")]
+ partial class AuditDocument
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.10")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Document.AuditDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditDocumentEnum")
+ .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.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.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