增加项目文档新表
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
hang 2025-02-21 14:20:39 +08:00
parent 5791aca9fd
commit 5dd2dfd17b
9 changed files with 38847 additions and 150 deletions

View File

@ -414,6 +414,7 @@ namespace IRaCIS.Core.Application.Service
await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser()
{
Password = newPwd,
LastChangePassWordTime = DateTime.Now,
IsFirstAdd = false
});
@ -459,6 +460,7 @@ namespace IRaCIS.Core.Application.Service
var success = await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.IdentityUserId, u => new IdentityUser()
{
Password = editPwModel.NewPassWord,
LastChangePassWordTime = DateTime.Now,
IsFirstAdd = false
});

View File

@ -16,28 +16,17 @@ namespace IRaCIS.Core.Domain.FileRecord
Doc = 2,
//记录
Record = 3
Record = 3,
//阅片人
Reviewer=4,
Template=5
}
[Comment("后台 - 系统文件记录表")]
[Table("SysFileRecord")]
public class SysFileRecord : BaseFullAuditEntity
{
[Comment("关联系统文件类型")]
public Guid SysFileTypeId { get; set; }
public string FileName { get; set; }
[StringLength(1000)]
public string FilePath { get; set; }
public string FileSize { get; set; }
public string FileFormat { get; set; }
}
[Comment("后台 - 系统文件类型表")]
[Table("SysFileType")]
public class SysFileType : BaseFullAuditEntity
@ -50,9 +39,15 @@ namespace IRaCIS.Core.Domain.FileRecord
public string NameCN { get; set; }
[Comment("是否确认收入项")]
public bool IsConfirmRecord { get; set; }
[Comment("子类标识,是取那个表的数据")]
public int SubIdentification { get; set; }
public bool IsEnable { get; set; }
}
[Comment("项目文件 - 文件类型表")]
@ -60,6 +55,9 @@ namespace IRaCIS.Core.Domain.FileRecord
public class TrialFileType : BaseFullAuditEntity
{
[Comment("关联系统文件类型")]
public Guid? SysFileTypeId { get; set; }
public Guid TrialId { get; set; }
[Comment("报告、文档、记录")]
@ -83,8 +81,10 @@ namespace IRaCIS.Core.Domain.FileRecord
[Comment("子类标识,是取那个表的数据")]
public int SubIdentification { get; set; }
[Comment("启动会日期")]
public DateOnly? StartupDate { get; set; }
public bool IsEnable { get; set; }
}
}

View File

@ -32,43 +32,16 @@ namespace IRaCIS.Core.Domain.FileRecord
[Comment("定稿PDF")]
public Guid PDFTrialFileRecordId { get; set; }
public Guid PDFFileRecordId { get; set; }
[Comment("定稿Word")]
public Guid WordTrialFileRecordId { get; set; }
public Guid WordFileRecordId { get; set; }
[Comment("签名页")]
public Guid SignTrialFileRecordId { get; set; }
public Guid SignFileRecordId { get; set; }
[Comment("历史记录")]
public Guid HistoryTrialFileRecordId { get; set; }
#region 废弃
[Comment("定稿PDF名字")]
public string PDFName { get; set; }
public string PDFPath { get; set; }
[Comment("定稿Word名字")]
public string WordName { get; set; }
public string WordPath { get; set; }
[Comment("签名页名字")]
public string SignFileName { get; set; }
public string SignFilePath { get; set; }
[Comment("历史记录名字")]
public string HistoryRecordFileName { get; set; }
public string HistoryRecordFilePath { get; set; }
#endregion
public Guid HistoryFileRecordId { get; set; }
}
@ -76,14 +49,19 @@ namespace IRaCIS.Core.Domain.FileRecord
[Comment("项目文件 - 一般文件记录表")]
[Table("TrialNormalFileRecord")]
public class TrialNormalFileRecord : BaseFullAuditEntity
[Table("TrialNormalRecord")]
public class TrialNormalRecord : BaseFullAuditEntity
{
public Guid TrialId { get; set; }
[Comment("关联项目文件类型")]
public Guid TrialFileTypeId { get; set; }
[Comment("文件类型,阅片人中使用")]
public int? ReviewerFileType { get; set; }
#region 文件控制
public int State { get; set; }
@ -95,18 +73,6 @@ namespace IRaCIS.Core.Domain.FileRecord
[Comment("关联具体的文件记录,记录里面有大小,格式,名称")]
public Guid TrialFileRecordId { get; set; }
#region 废弃
public string FileName { get; set; }
[StringLength(1000)]
public string FilePath { get; set; }
public string FileSize { get; set; }
public string FileFormat { get; set; }
#endregion
}
@ -146,11 +112,13 @@ namespace IRaCIS.Core.Domain.FileRecord
}
[Comment("项目文件 - 文件记录表")]
[Table("TrialFileRecord")]
public class TrialFileRecord : BaseFullAuditEntity
[Comment("项目文件 - 文件表")]
[Table("TrialFile")]
public class TrialFile : BaseFullAuditEntity
{
public Guid TrialId { get; set; }
[Comment("关联项目文件类型")]
public Guid TrialFileTypeId { get; set; }
public string FileName { get; set; }
@ -161,5 +129,7 @@ namespace IRaCIS.Core.Domain.FileRecord
public string FileFormat { get; set; }
}
}

View File

@ -1,4 +1,5 @@
using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain.FileRecord;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure.Encryption;
@ -639,6 +640,16 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<TrialDocConfirmedIdentityUser> TrialDocConfirmedIdentityUser { get; set; }
#region 报告、 文档、记录
public virtual DbSet<SysFileType> SysFileType { get; set; }
public virtual DbSet<TrialFileType> TrialFileType { get; set; }
public virtual DbSet<TrialFinalRecord> TrialFinalRecord { get; set; }
public virtual DbSet<TrialNormalRecord> TrialNormalRecord { get; set; }
public virtual DbSet<TrialTrianingRecord> TrialTrianingRecord { get; set; }
public virtual DbSet<TrialFile> TrialFile { get; set; }
#endregion
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,472 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class trialdocRecord : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Code",
table: "User");
migrationBuilder.DropColumn(
name: "DepartmentName",
table: "User");
migrationBuilder.DropColumn(
name: "EmailToken",
table: "User");
migrationBuilder.DropColumn(
name: "IsFirstAdd",
table: "User");
migrationBuilder.DropColumn(
name: "IsTestUser",
table: "User");
migrationBuilder.DropColumn(
name: "IsZhiZhun",
table: "User");
migrationBuilder.DropColumn(
name: "LastChangePassWordTime",
table: "User");
migrationBuilder.DropColumn(
name: "LastLoginIP",
table: "User");
migrationBuilder.DropColumn(
name: "LastLoginTime",
table: "User");
migrationBuilder.DropColumn(
name: "OrganizationName",
table: "User");
migrationBuilder.DropColumn(
name: "Password",
table: "User");
migrationBuilder.DropColumn(
name: "PasswordChanged",
table: "User");
migrationBuilder.DropColumn(
name: "Phone",
table: "User");
migrationBuilder.DropColumn(
name: "PositionName",
table: "User");
migrationBuilder.DropColumn(
name: "Sex",
table: "User");
migrationBuilder.DropColumn(
name: "Status",
table: "User");
migrationBuilder.DropColumn(
name: "SuperAdmin",
table: "User");
migrationBuilder.DropColumn(
name: "UserCode",
table: "User");
migrationBuilder.DropColumn(
name: "JoinTime",
table: "TrialUser");
migrationBuilder.DropColumn(
name: "RemoveTime",
table: "TrialUser");
migrationBuilder.CreateTable(
name: "SysFileType",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ArchiveTypeEnum = table.Column<int>(type: "int", nullable: false, comment: "报告、文档、记录"),
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
NameCN = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsConfirmRecord = table.Column<bool>(type: "bit", nullable: false, comment: "是否确认收入项"),
SubIdentification = table.Column<int>(type: "int", nullable: false, comment: "子类标识,是取那个表的数据"),
IsEnable = table.Column<bool>(type: "bit", nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SysFileType", x => x.Id);
table.ForeignKey(
name: "FK_SysFileType_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "后台 - 系统文件类型表");
migrationBuilder.CreateTable(
name: "TrialFile",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialFileTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联项目文件类型"),
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
FilePath = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
FileSize = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
FileFormat = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialFile", x => x.Id);
table.ForeignKey(
name: "FK_TrialFile_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目文件 - 文件表");
migrationBuilder.CreateTable(
name: "TrialFileType",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SysFileTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "关联系统文件类型"),
TrialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ArchiveTypeEnum = table.Column<int>(type: "int", nullable: false, comment: "报告、文档、记录"),
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
NameCN = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsConfirmRecord = table.Column<bool>(type: "bit", nullable: false, comment: "是否确认收入项"),
FirstFinalDate = table.Column<DateOnly>(type: "date", nullable: false, comment: "首次定稿日期"),
IsSelfDefine = table.Column<bool>(type: "bit", nullable: false, comment: "是否自定义"),
SubIdentification = table.Column<int>(type: "int", nullable: false, comment: "子类标识,是取那个表的数据"),
IsEnable = table.Column<bool>(type: "bit", nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialFileType", x => x.Id);
table.ForeignKey(
name: "FK_TrialFileType_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目文件 - 文件类型表");
migrationBuilder.CreateTable(
name: "TrialFinalRecord",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialFileTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联项目文件类型"),
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
Version = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
State = table.Column<int>(type: "int", nullable: false),
IsAuthorizedView = table.Column<bool>(type: "bit", nullable: false, comment: "是否授权查看"),
PDFFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "定稿PDF"),
WordFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "定稿Word"),
SignFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "签名页"),
HistoryFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "历史记录"),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialFinalRecord", x => x.Id);
table.ForeignKey(
name: "FK_TrialFinalRecord_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目文件 - 定稿记录表");
migrationBuilder.CreateTable(
name: "TrialNormalFileRecord",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialFileTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联项目文件类型"),
ReviewerFileType = table.Column<int>(type: "int", nullable: true, comment: "文件类型,阅片人中使用"),
State = table.Column<int>(type: "int", nullable: false),
IsAuthorizedView = table.Column<bool>(type: "bit", nullable: false, comment: "是否授权查看"),
TrialFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联具体的文件记录,记录里面有大小,格式,名称"),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialNormalFileRecord", x => x.Id);
table.ForeignKey(
name: "FK_TrialNormalFileRecord_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目文件 - 一般文件记录表");
migrationBuilder.CreateTable(
name: "TrialTrianingRecord",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialFileTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联项目文件类型"),
TrianingDate = table.Column<DateOnly>(type: "date", nullable: false),
TrianingCount = table.Column<int>(type: "int", nullable: false),
TrianingState = table.Column<int>(type: "int", nullable: false, comment: "培训效果"),
State = table.Column<int>(type: "int", nullable: false),
IsAuthorizedView = table.Column<bool>(type: "bit", nullable: false, comment: "是否授权查看"),
TrialFileRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "关联具体的文件记录,记录里面有大小,格式,名称"),
Note = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialTrianingRecord", x => x.Id);
table.ForeignKey(
name: "FK_TrialTrianingRecord_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目文件 - 培训记录表");
migrationBuilder.CreateIndex(
name: "IX_SysFileType_CreateUserId",
table: "SysFileType",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialFile_CreateUserId",
table: "TrialFile",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialFileType_CreateUserId",
table: "TrialFileType",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialFinalRecord_CreateUserId",
table: "TrialFinalRecord",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialNormalFileRecord_CreateUserId",
table: "TrialNormalFileRecord",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialTrianingRecord_CreateUserId",
table: "TrialTrianingRecord",
column: "CreateUserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SysFileType");
migrationBuilder.DropTable(
name: "TrialFile");
migrationBuilder.DropTable(
name: "TrialFileType");
migrationBuilder.DropTable(
name: "TrialFinalRecord");
migrationBuilder.DropTable(
name: "TrialNormalFileRecord");
migrationBuilder.DropTable(
name: "TrialTrianingRecord");
migrationBuilder.AddColumn<int>(
name: "Code",
table: "User",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "DepartmentName",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "EmailToken",
table: "User",
type: "nvarchar(1000)",
maxLength: 1000,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<bool>(
name: "IsFirstAdd",
table: "User",
type: "bit",
nullable: false,
defaultValue: false,
comment: "首次登录需要修改密码");
migrationBuilder.AddColumn<bool>(
name: "IsTestUser",
table: "User",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsZhiZhun",
table: "User",
type: "bit",
nullable: false,
defaultValue: false,
comment: "内部用户 外部用户");
migrationBuilder.AddColumn<DateTime>(
name: "LastChangePassWordTime",
table: "User",
type: "datetime2",
nullable: true,
comment: "上一次修改密码的时间");
migrationBuilder.AddColumn<string>(
name: "LastLoginIP",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<DateTime>(
name: "LastLoginTime",
table: "User",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OrganizationName",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "Password",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<bool>(
name: "PasswordChanged",
table: "User",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "Phone",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "PositionName",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<int>(
name: "Sex",
table: "User",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "Status",
table: "User",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<bool>(
name: "SuperAdmin",
table: "User",
type: "bit",
nullable: false,
defaultValue: false,
comment: "后续删除");
migrationBuilder.AddColumn<string>(
name: "UserCode",
table: "User",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<DateTime>(
name: "JoinTime",
table: "TrialUser",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RemoveTime",
table: "TrialUser",
type: "datetime2",
nullable: true);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class trialdocRecordReName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_TrialNormalFileRecord_User_CreateUserId",
table: "TrialNormalFileRecord");
migrationBuilder.DropPrimaryKey(
name: "PK_TrialNormalFileRecord",
table: "TrialNormalFileRecord");
migrationBuilder.RenameTable(
name: "TrialNormalFileRecord",
newName: "TrialNormalRecord");
migrationBuilder.RenameIndex(
name: "IX_TrialNormalFileRecord_CreateUserId",
table: "TrialNormalRecord",
newName: "IX_TrialNormalRecord_CreateUserId");
migrationBuilder.AddPrimaryKey(
name: "PK_TrialNormalRecord",
table: "TrialNormalRecord",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_TrialNormalRecord_User_CreateUserId",
table: "TrialNormalRecord",
column: "CreateUserId",
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_TrialNormalRecord_User_CreateUserId",
table: "TrialNormalRecord");
migrationBuilder.DropPrimaryKey(
name: "PK_TrialNormalRecord",
table: "TrialNormalRecord");
migrationBuilder.RenameTable(
name: "TrialNormalRecord",
newName: "TrialNormalFileRecord");
migrationBuilder.RenameIndex(
name: "IX_TrialNormalRecord_CreateUserId",
table: "TrialNormalFileRecord",
newName: "IX_TrialNormalFileRecord_CreateUserId");
migrationBuilder.AddPrimaryKey(
name: "PK_TrialNormalFileRecord",
table: "TrialNormalFileRecord",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_TrialNormalFileRecord_User_CreateUserId",
table: "TrialNormalFileRecord",
column: "CreateUserId",
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View File

@ -22,6 +22,352 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.SysFileType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("ArchiveTypeEnum")
.HasColumnType("int")
.HasComment("报告、文档、记录");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsConfirmRecord")
.HasColumnType("bit")
.HasComment("是否确认收入项");
b.Property<bool>("IsEnable")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("NameCN")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int>("SubIdentification")
.HasColumnType("int")
.HasComment("子类标识,是取那个表的数据");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("SysFileType", t =>
{
t.HasComment("后台 - 系统文件类型表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialFile", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("FileFormat")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("FilePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<string>("FileSize")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<Guid>("TrialFileTypeId")
.HasColumnType("uniqueidentifier")
.HasComment("关联项目文件类型");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("TrialFile", t =>
{
t.HasComment("项目文件 - 文件表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialFileType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("ArchiveTypeEnum")
.HasColumnType("int")
.HasComment("报告、文档、记录");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateOnly>("FirstFinalDate")
.HasColumnType("date")
.HasComment("首次定稿日期");
b.Property<bool>("IsConfirmRecord")
.HasColumnType("bit")
.HasComment("是否确认收入项");
b.Property<bool>("IsEnable")
.HasColumnType("bit");
b.Property<bool>("IsSelfDefine")
.HasColumnType("bit")
.HasComment("是否自定义");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("NameCN")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int>("SubIdentification")
.HasColumnType("int")
.HasComment("子类标识,是取那个表的数据");
b.Property<Guid?>("SysFileTypeId")
.HasColumnType("uniqueidentifier")
.HasComment("关联系统文件类型");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("TrialFileType", t =>
{
t.HasComment("项目文件 - 文件类型表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialFinalRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("HistoryFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("历史记录");
b.Property<bool>("IsAuthorizedView")
.HasColumnType("bit")
.HasComment("是否授权查看");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<Guid>("PDFFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("定稿PDF");
b.Property<Guid>("SignFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("签名页");
b.Property<int>("State")
.HasColumnType("int");
b.Property<Guid>("TrialFileTypeId")
.HasColumnType("uniqueidentifier")
.HasComment("关联项目文件类型");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<Guid>("WordFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("定稿Word");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("TrialFinalRecord", t =>
{
t.HasComment("项目文件 - 定稿记录表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialNormalRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsAuthorizedView")
.HasColumnType("bit")
.HasComment("是否授权查看");
b.Property<int?>("ReviewerFileType")
.HasColumnType("int")
.HasComment("文件类型,阅片人中使用");
b.Property<int>("State")
.HasColumnType("int");
b.Property<Guid>("TrialFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("关联具体的文件记录,记录里面有大小,格式,名称");
b.Property<Guid>("TrialFileTypeId")
.HasColumnType("uniqueidentifier")
.HasComment("关联项目文件类型");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("TrialNormalRecord", t =>
{
t.HasComment("项目文件 - 一般文件记录表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialTrianingRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsAuthorizedView")
.HasColumnType("bit")
.HasComment("是否授权查看");
b.Property<string>("Note")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int>("State")
.HasColumnType("int");
b.Property<Guid>("TrialFileRecordId")
.HasColumnType("uniqueidentifier")
.HasComment("关联具体的文件记录,记录里面有大小,格式,名称");
b.Property<Guid>("TrialFileTypeId")
.HasColumnType("uniqueidentifier")
.HasComment("关联项目文件类型");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
b.Property<int>("TrianingCount")
.HasColumnType("int");
b.Property<DateOnly>("TrianingDate")
.HasColumnType("date");
b.Property<int>("TrianingState")
.HasColumnType("int")
.HasComment("培训效果");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("TrialTrianingRecord", t =>
{
t.HasComment("项目文件 - 培训记录表");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b =>
{
b.Property<Guid>("Id")
@ -12757,12 +13103,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("JoinTime")
.HasColumnType("datetime2");
b.Property<DateTime?>("RemoveTime")
.HasColumnType("datetime2");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
@ -13102,20 +13442,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("bit")
.HasComment("自动切换下一个任务");
b.Property<int>("Code")
.HasColumnType("int");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("DepartmentName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<Guid?>("DoctorId")
.HasColumnType("uniqueidentifier")
.HasComment("医生生成账号后,会有值");
@ -13125,11 +13457,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("EmailToken")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(400)
@ -13138,81 +13465,20 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("IdentityUserId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsFirstAdd")
.HasColumnType("bit")
.HasComment("首次登录需要修改密码");
b.Property<bool>("IsTestUser")
.HasColumnType("bit");
b.Property<bool>("IsUserRoleDisabled")
.HasColumnType("bit");
b.Property<bool>("IsZhiZhun")
.HasColumnType("bit")
.HasComment("内部用户 外部用户");
b.Property<DateTime?>("LastChangePassWordTime")
.HasColumnType("datetime2")
.HasComment("上一次修改密码的时间");
b.Property<string>("LastLoginIP")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<DateTime?>("LastLoginTime")
.HasColumnType("datetime2");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("OrganizationName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<bool>("PasswordChanged")
.HasColumnType("bit");
b.Property<string>("Phone")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("PositionName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int?>("Sex")
.HasColumnType("int");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<bool>("SuperAdmin")
.HasColumnType("bit")
.HasComment("后续删除");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("UserCode")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(400)
@ -14128,6 +14394,72 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.ToTable("TestLength");
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.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.FileRecord.TrialFile", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUserRole");
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.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.FileRecord.TrialFinalRecord", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUserRole");
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialNormalRecord", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUserRole");
});
modelBuilder.Entity("IRaCIS.Core.Domain.FileRecord.TrialTrianingRecord", 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.Attachment", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
@ -14369,7 +14701,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy")
.WithMany()
.WithMany("InstanceList")
.HasForeignKey("StudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
@ -18174,6 +18506,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
{
b.Navigation("DicomStudyMonitorList");
b.Navigation("InstanceList");
b.Navigation("ReadingClinicalDataList");
b.Navigation("ReadingConsistentClinicalDataList");