添加分割绑定
continuous-integration/drone/push Build is passing

This commit is contained in:
Hewt
2026-03-19 15:24:34 +08:00
parent 67216d1c92
commit c84fed8af1
9 changed files with 22295 additions and 0 deletions
@@ -362,6 +362,8 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<Segment> Segment { get; set; }
public virtual DbSet<SegmentBinding> SegmentBinding { get; set; }
public virtual DbSet<TrialCriterionKeyFile> TrialCriterionKeyFile { get; set; }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,55 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class SegmentBinding : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SegmentBinding",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SegmentationId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SegmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
VisitTaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
QuestionId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
RowId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TableQuestionId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
DeletedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
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_SegmentBinding", x => x.Id)
.Annotation("SqlServer:Clustered", false);
},
comment: "分割绑定");
migrationBuilder.CreateIndex(
name: "IX_SegmentBinding_CreateTime",
table: "SegmentBinding",
column: "CreateTime")
.Annotation("SqlServer:Clustered", true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SegmentBinding");
}
}
}
@@ -9324,6 +9324,64 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SegmentBinding", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleteUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletedTime")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid?>("QuestionId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("RowId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("SegmentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("SegmentationId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TableQuestionId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("VisitTaskId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false);
b.HasIndex("CreateTime");
SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime"));
b.ToTable("SegmentBinding", t =>
{
t.HasComment("分割绑定");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Segmentation", b =>
{
b.Property<Guid>("Id")
@@ -19031,6 +19089,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("CreateUserRole");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SegmentBinding", 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.Segmentation", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")