更新数据库
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-03-21 10:19:04 +08:00
parent 91b20e07f2
commit 582b8b3c07
6 changed files with 37683 additions and 1 deletions

View File

@ -591,6 +591,8 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<SubjectVisitClinicalDialog> SubjectVisitClinicalDialog { get; set; }
public virtual DbSet<HIRHospital> HIRHospital { get; set; }
}
public class TestLength : Entity

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,97 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class hirAddHospital : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DicomInstance_DicomStudy_StudyId",
table: "DicomInstance");
migrationBuilder.DropForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance");
migrationBuilder.AddColumn<Guid>(
name: "TaskStudySeqId",
table: "TaskInstance",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_TaskInstance_TaskStudySeqId",
table: "TaskInstance",
column: "TaskStudySeqId");
migrationBuilder.AddForeignKey(
name: "FK_DicomInstance_DicomStudy_StudyId",
table: "DicomInstance",
column: "StudyId",
principalTable: "DicomStudy",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance",
column: "StudyId",
principalTable: "TaskStudy",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_TaskInstance_TaskStudy_TaskStudySeqId",
table: "TaskInstance",
column: "TaskStudySeqId",
principalTable: "TaskStudy",
principalColumn: "SeqId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DicomInstance_DicomStudy_StudyId",
table: "DicomInstance");
migrationBuilder.DropForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance");
migrationBuilder.DropForeignKey(
name: "FK_TaskInstance_TaskStudy_TaskStudySeqId",
table: "TaskInstance");
migrationBuilder.DropIndex(
name: "IX_TaskInstance_TaskStudySeqId",
table: "TaskInstance");
migrationBuilder.DropColumn(
name: "TaskStudySeqId",
table: "TaskInstance");
migrationBuilder.AddForeignKey(
name: "FK_DicomInstance_DicomStudy_StudyId",
table: "DicomInstance",
column: "StudyId",
principalTable: "DicomStudy",
principalColumn: "SeqId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance",
column: "StudyId",
principalTable: "TaskStudy",
principalColumn: "SeqId",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class hirAddHospital2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "HIRHospital",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
HospitalName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
HospitalAliasName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
Country = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
City = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
Province = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
Address = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
Phone = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsCanConnectInternet = table.Column<bool>(type: "bit", nullable: false),
HospitalCode = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
HospitalLogoPath = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
TrialKeepCount = table.Column<int>(type: "int", nullable: false),
IsDefault = 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_HIRHospital", x => x.Id);
table.ForeignKey(
name: "FK_HIRHospital_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_HIRHospital_CreateUserId",
table: "HIRHospital",
column: "CreateUserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "HIRHospital");
}
}
}

View File

@ -2610,6 +2610,84 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.HIRHospital", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("City")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("Country")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("HospitalAliasName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("HospitalCode")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("HospitalLogoPath")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("HospitalName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<bool>("IsCanConnectInternet")
.HasColumnType("bit");
b.Property<bool>("IsDefault")
.HasColumnType("bit");
b.Property<string>("Phone")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("Province")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int>("TrialKeepCount")
.HasColumnType("int");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.ToTable("HIRHospital");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b =>
{
b.Property<Guid>("Id")
@ -9873,6 +9951,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("SubjectId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TaskStudySeqId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
@ -9903,6 +9984,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasIndex("StudyId");
b.HasIndex("TaskStudySeqId");
b.ToTable("TaskInstance", t =>
{
t.HasComment("项目阅片 - 任务后处理Instance");
@ -14451,6 +14534,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy")
.WithMany()
.HasForeignKey("StudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -14791,6 +14875,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("CreateUser");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.HIRHospital", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUser");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser")
@ -16938,11 +17033,16 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy")
.WithMany("InstanceList")
.WithMany()
.HasForeignKey("StudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", null)
.WithMany("InstanceList")
.HasForeignKey("TaskStudySeqId");
b.Navigation("CreateUser");
b.Navigation("TaskSeries");