添加表
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1b9351b23f
commit
018c9afee0
|
@ -12,6 +12,10 @@ public class TrialDocument : BaseFullDeleteAuditEntity
|
|||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SystemDocumentAttachment> SystemDocumentAttachmentList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("FileTypeId")]
|
||||
public Dictionary FileType { get; set; }
|
||||
|
@ -48,3 +52,45 @@ public class TrialDocument : BaseFullDeleteAuditEntity
|
|||
public bool IsPublish { get; set; } = true;
|
||||
}
|
||||
|
||||
[Comment("项目签署文档附件")]
|
||||
[Table("TrialDocumentAttachment")]
|
||||
public class TrialDocumentAttachment : BaseFullAuditEntity
|
||||
{
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialDocumentId")]
|
||||
public TrialDocument TrialDocument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目文档Id
|
||||
/// </summary>
|
||||
public Guid TrialDocumentId { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否下线
|
||||
/// </summary>
|
||||
public bool OffLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
[StringLength(1000)]
|
||||
public string FilePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 文件大小
|
||||
/// </summary>
|
||||
public decimal? FileSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string FileFormat { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -532,6 +532,8 @@ public class IRaCISDBContext : DbContext
|
|||
public virtual DbSet<SystemDocument> SystemDocument { get; set; }
|
||||
public virtual DbSet<SystemDocumentAttachment> SystemDocumentAttachment { get; set; }
|
||||
public virtual DbSet<TrialDocument> TrialDocument { get; set; }
|
||||
|
||||
public virtual DbSet<TrialDocumentAttachment> TrialDocumentAttachment { get; set; }
|
||||
public virtual DbSet<TrialDocNeedConfirmedUserType> TrialDocUserTypeConfirm { get; set; }
|
||||
public virtual DbSet<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserType { get; set; }
|
||||
|
||||
|
|
19626
IRaCIS.Core.Infra.EFCore/Migrations/20250604061252_TrialDocumentAttachment.Designer.cs
generated
Normal file
19626
IRaCIS.Core.Infra.EFCore/Migrations/20250604061252_TrialDocumentAttachment.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TrialDocumentAttachment : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "TrialDocumentId",
|
||||
table: "SystemDocumentAttachment",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TrialDocumentAttachment",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TrialDocumentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||
OffLine = table.Column<bool>(type: "bit", nullable: false),
|
||||
FilePath = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
|
||||
FileSize = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
|
||||
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_TrialDocumentAttachment", x => x.Id);
|
||||
},
|
||||
comment: "项目签署文档附件");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemDocumentAttachment_TrialDocumentId",
|
||||
table: "SystemDocumentAttachment",
|
||||
column: "TrialDocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialDocumentAttachment_CreateUserId",
|
||||
table: "TrialDocumentAttachment",
|
||||
column: "CreateUserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialDocumentAttachment_TrialDocumentId",
|
||||
table: "TrialDocumentAttachment",
|
||||
column: "TrialDocumentId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
|
||||
table: "SystemDocumentAttachment",
|
||||
column: "TrialDocumentId",
|
||||
principalTable: "TrialDocument",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
|
||||
table: "SystemDocumentAttachment");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TrialDocumentAttachment");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SystemDocumentAttachment_TrialDocumentId",
|
||||
table: "SystemDocumentAttachment");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TrialDocumentId",
|
||||
table: "SystemDocumentAttachment");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9790,6 +9790,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SystemDocumentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TrialDocumentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
|
@ -9802,6 +9805,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("SystemDocumentId");
|
||||
|
||||
b.HasIndex("TrialDocumentId");
|
||||
|
||||
b.ToTable("SystemDocumentAttachment", t =>
|
||||
{
|
||||
t.HasComment("后台 - 系统签署文档附件");
|
||||
|
@ -11786,6 +11791,65 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", 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<decimal?>("FileSize")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<bool>("OffLine")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid>("TrialDocumentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("TrialDocumentId");
|
||||
|
||||
b.ToTable("TrialDocumentAttachment", t =>
|
||||
{
|
||||
t.HasComment("项目签署文档附件");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
@ -17449,6 +17513,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", null)
|
||||
.WithMany("SystemDocumentAttachmentList")
|
||||
.HasForeignKey("TrialDocumentId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SystemDocument");
|
||||
|
@ -18087,6 +18155,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Navigation("Trial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreateUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrialDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("TrialDocument");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig")
|
||||
|
@ -19440,6 +19527,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
{
|
||||
b.Navigation("NeedConfirmedUserTypeList");
|
||||
|
||||
b.Navigation("SystemDocumentAttachmentList");
|
||||
|
||||
b.Navigation("TrialDocConfirmedUserList");
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue