เก็บประวัติการขยายเวลา
This commit is contained in:
parent
8dae449c62
commit
0c1ae31b22
12 changed files with 11898 additions and 0 deletions
11450
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231206093300_add table DisciplineInvestigateExtends.Designer.cs
generated
Normal file
11450
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231206093300_add table DisciplineInvestigateExtends.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,103 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addtableDisciplineInvestigateExtends : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineDisciplinaryExtends",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อการขยาย")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Num = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่ขยาย"),
|
||||
DateStart = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่เริ่ม"),
|
||||
DateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่สิ้นสุด"),
|
||||
DisciplineDisciplinaryId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineDisciplinaryExtends", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineDisciplinaryExtends_DisciplineDisciplinarys_Discip~",
|
||||
column: x => x.DisciplineDisciplinaryId,
|
||||
principalTable: "DisciplineDisciplinarys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigateExtends",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อการขยาย")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Num = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่ขยาย"),
|
||||
DateStart = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่เริ่ม"),
|
||||
DateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่สิ้นสุด"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigateExtends", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigateExtends_DisciplineInvestigates_Discipli~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineDisciplinaryExtends_DisciplineDisciplinaryId",
|
||||
table: "DisciplineDisciplinaryExtends",
|
||||
column: "DisciplineDisciplinaryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigateExtends_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigateExtends",
|
||||
column: "DisciplineInvestigateId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineDisciplinaryExtends");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigateExtends");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -679,6 +679,79 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.ToTable("DisciplineDisciplinarys");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<DateTime?>("DateEnd")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สิ้นสุด");
|
||||
|
||||
b.Property<DateTime?>("DateStart")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เริ่ม");
|
||||
|
||||
b.Property<Guid>("DisciplineDisciplinaryId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อการขยาย");
|
||||
|
||||
b.Property<int>("Num")
|
||||
.HasColumnType("int")
|
||||
.HasComment("ครั้งที่ขยาย");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineDisciplinaryId");
|
||||
|
||||
b.ToTable("DisciplineDisciplinaryExtends");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -1508,6 +1581,79 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.ToTable("DisciplineInvestigates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<DateTime?>("DateEnd")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สิ้นสุด");
|
||||
|
||||
b.Property<DateTime?>("DateStart")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เริ่ม");
|
||||
|
||||
b.Property<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อการขยาย");
|
||||
|
||||
b.Property<int>("Num")
|
||||
.HasColumnType("int")
|
||||
.HasComment("ครั้งที่ขยาย");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.ToTable("DisciplineInvestigateExtends");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -9978,6 +10124,17 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.Navigation("DisciplineInvestigate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary")
|
||||
.WithMany("DisciplineDisciplinaryExtends")
|
||||
.HasForeignKey("DisciplineDisciplinaryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineDisciplinary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector")
|
||||
|
|
@ -10171,6 +10328,17 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.Navigation("DisciplineComplaint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigateExtends")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
|
|
@ -11060,6 +11228,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b =>
|
||||
{
|
||||
b.Navigation("DisciplineDisciplinaryExtends");
|
||||
|
||||
b.Navigation("DisciplineDisciplinary_DirectorInvestigates");
|
||||
|
||||
b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates");
|
||||
|
|
@ -11090,6 +11260,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
{
|
||||
b.Navigation("DisciplineDisciplinarys");
|
||||
|
||||
b.Navigation("DisciplineInvestigateExtends");
|
||||
|
||||
b.Navigation("DisciplineInvestigateRelevant_Docs");
|
||||
|
||||
b.Navigation("DisciplineInvestigate_Directors");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue