数据同步增加表,增加项目字段,修改项目配置接口,更新邮件发送包2
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6427d1f5fb
commit
c906284f07
|
|
@ -7,6 +7,10 @@ public class FileUploadRecord : BaseFullAuditEntity
|
|||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
|
@ -51,15 +55,21 @@ public class FileUploadRecord : BaseFullAuditEntity
|
|||
}
|
||||
|
||||
[Comment("同步任务记录表")]
|
||||
[Table("FileUploadRecord")]
|
||||
public class UploadFileSyncRecord
|
||||
[Table("UploadFileSyncRecord")]
|
||||
public class UploadFileSyncRecord : BaseFullAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public FileUpload FileUpload { get; set; }
|
||||
public FileUploadRecord FileUploadRecord { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid FileUploadId { get; set; }
|
||||
public Guid FileUploadRecordId { get; set; }
|
||||
|
||||
public int Priority { get; set; }
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public jobState JobState { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -727,7 +727,11 @@ public class IRaCISDBContext : DbContext
|
|||
|
||||
public virtual DbSet<AuditDocumentClosure> AuditDocumentClosure { get; set; }
|
||||
|
||||
public virtual DbSet<FileUploadRecord> FileUploadRecord { get; set; }
|
||||
|
||||
public virtual DbSet<UploadFileSyncRecord> UploadFileSyncRecord { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TestLength : Entity
|
||||
|
|
|
|||
21683
IRaCIS.Core.Infra.EFCore/Migrations/20260309095752_addDataSync.Designer.cs
generated
Normal file
21683
IRaCIS.Core.Infra.EFCore/Migrations/20260309095752_addDataSync.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,167 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addDataSync : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TrialExtraConfigJsonStr",
|
||||
table: "Trial",
|
||||
type: "nvarchar(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(1000)",
|
||||
oldMaxLength: 1000);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TrialDataStoreType",
|
||||
table: "Trial",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FileUploadRecord",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TrialId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
SubjectId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
SubjectVisitId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||
FileSize = table.Column<long>(type: "bigint", nullable: false),
|
||||
FileType = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||
UploadRegion = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||
UploadFinishedTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "上传结束时间"),
|
||||
Path = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
|
||||
FileMarkId = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "文件标识ID"),
|
||||
IsNeedSync = table.Column<bool>(type: "bit", nullable: true, comment: "是否需要同步"),
|
||||
IsSync = table.Column<bool>(type: "bit", nullable: true, comment: "是否已同步-最后一个任务的状态"),
|
||||
syncFinishedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "同步结束时间-最后一个任务的时间"),
|
||||
IP = 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_FileUploadRecord", x => x.Id)
|
||||
.Annotation("SqlServer:Clustered", false);
|
||||
table.ForeignKey(
|
||||
name: "FK_FileUploadRecord_SubjectVisit_SubjectVisitId",
|
||||
column: x => x.SubjectVisitId,
|
||||
principalTable: "SubjectVisit",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_FileUploadRecord_Subject_SubjectId",
|
||||
column: x => x.SubjectId,
|
||||
principalTable: "Subject",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_FileUploadRecord_Trial_TrialId",
|
||||
column: x => x.TrialId,
|
||||
principalTable: "Trial",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_FileUploadRecord_User_CreateUserId",
|
||||
column: x => x.CreateUserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "整个系统,上传记录表");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UploadFileSyncRecord",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
FileUploadRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Priority = table.Column<int>(type: "int", nullable: false),
|
||||
StartTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
JobState = table.Column<int>(type: "int", nullable: false),
|
||||
Msg = 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_UploadFileSyncRecord", x => x.Id)
|
||||
.Annotation("SqlServer:Clustered", false);
|
||||
table.ForeignKey(
|
||||
name: "FK_UploadFileSyncRecord_FileUploadRecord_FileUploadRecordId",
|
||||
column: x => x.FileUploadRecordId,
|
||||
principalTable: "FileUploadRecord",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_UploadFileSyncRecord_User_CreateUserId",
|
||||
column: x => x.CreateUserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "同步任务记录表");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_FileUploadRecord_CreateTime",
|
||||
// table: "FileUploadRecord",
|
||||
// column: "CreateTime")
|
||||
// .Annotation("SqlServer:Clustered", true);
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_UploadFileSyncRecord_CreateTime",
|
||||
// table: "UploadFileSyncRecord",
|
||||
// column: "CreateTime")
|
||||
// .Annotation("SqlServer:Clustered", true);
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_Vacation_Doctor_DoctorId",
|
||||
// table: "Vacation",
|
||||
// column: "DoctorId",
|
||||
// principalTable: "Doctor",
|
||||
// principalColumn: "Id",
|
||||
// onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Vacation_Doctor_DoctorId",
|
||||
table: "Vacation");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "UploadFileSyncRecord");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FileUploadRecord");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TrialDataStoreType",
|
||||
table: "Trial");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TrialExtraConfigJsonStr",
|
||||
table: "Trial",
|
||||
type: "nvarchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(2000)",
|
||||
oldMaxLength: 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3100,6 +3100,96 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.FileUploadRecord", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("FileMarkId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)")
|
||||
.HasComment("文件标识ID");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<long>("FileSize")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("IP")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<bool?>("IsNeedSync")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否需要同步");
|
||||
|
||||
b.Property<bool?>("IsSync")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否已同步-最后一个任务的状态");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid?>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UploadFinishedTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasComment("上传结束时间");
|
||||
|
||||
b.Property<string>("UploadRegion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<DateTime?>("syncFinishedTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasComment("同步结束时间-最后一个任务的时间");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false);
|
||||
|
||||
b.HasIndex("CreateTime");
|
||||
|
||||
SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime"));
|
||||
|
||||
b.ToTable("FileUploadRecord", t =>
|
||||
{
|
||||
t.HasComment("整个系统,上传记录表");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -12295,14 +12385,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<int>("TrialDataStoreType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TrialEnrollStatus")
|
||||
.HasColumnType("int")
|
||||
.HasComment("入组那一块的状态");
|
||||
|
||||
b.Property<string>("TrialExtraConfigJsonStr")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
b.Property<DateTime?>("TrialFinishTime")
|
||||
.HasColumnType("datetime2")
|
||||
|
|
@ -15104,6 +15197,57 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UploadFileSyncRecord", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("EndTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("FileUploadRecordId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("JobState")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Msg")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<int>("Priority")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("StartTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false);
|
||||
|
||||
b.HasIndex("CreateTime");
|
||||
|
||||
SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime"));
|
||||
|
||||
b.ToTable("UploadFileSyncRecord", t =>
|
||||
{
|
||||
t.HasComment("同步任务记录表");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -17124,6 +17268,35 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Navigation("CreateUserRole");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.FileUploadRecord", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreateUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrialId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("Subject");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("Trial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
|
|
@ -20589,6 +20762,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Navigation("CreateUserRole");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UploadFileSyncRecord", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreateUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.FileUploadRecord", "FileUploadRecord")
|
||||
.WithMany()
|
||||
.HasForeignKey("FileUploadRecordId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("FileUploadRecord");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
|
|
@ -20763,7 +20955,15 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor")
|
||||
.WithMany("VacationList")
|
||||
.HasForeignKey("DoctorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("Doctor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b =>
|
||||
|
|
@ -21053,6 +21253,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("UserRole")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("VacationList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailLog", b =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue