migrate db

This commit is contained in:
kittapath 2025-06-20 01:24:57 +07:00
parent 30ff1ae15c
commit 1e5676e8ab
6 changed files with 25936 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,428 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class update_table_discipline_add_dna : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementResignEmployeeCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementResignEmployeeCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementResignEmployeeCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementResignEmployeeCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementResignEmployeeCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementResignCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementResignCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementResignCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementResignCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementResignCancels",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1Id",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2Id",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3Id",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4Id",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "root",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootId",
table: "RetirementQuestions",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RetirementEmployeeQuestions",
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"),
RetirementResignEmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ReasonWork = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร")
.Annotation("MySql:CharSet", "utf8mb4"),
ReasonWorkOther = table.Column<string>(type: "longtext", nullable: true, comment: "อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร")
.Annotation("MySql:CharSet", "utf8mb4"),
TimeThink = table.Column<int>(type: "int", nullable: true, comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"),
ExitFactor = table.Column<string>(type: "longtext", nullable: true, comment: "ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
ExitFactorOther = table.Column<string>(type: "longtext", nullable: true, comment: "อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
Adjust = table.Column<string>(type: "longtext", nullable: true, comment: "อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง")
.Annotation("MySql:CharSet", "utf8mb4"),
AdjustOther = table.Column<string>(type: "longtext", nullable: true, comment: "อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง")
.Annotation("MySql:CharSet", "utf8mb4"),
RealReason = table.Column<string>(type: "longtext", nullable: true, comment: "โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร")
.Annotation("MySql:CharSet", "utf8mb4"),
NotExitFactor = table.Column<string>(type: "longtext", nullable: true, comment: "ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร")
.Annotation("MySql:CharSet", "utf8mb4"),
Havejob = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"),
HavejobReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร")
.Annotation("MySql:CharSet", "utf8mb4"),
SuggestFriends = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"),
SuggestFriendsReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่")
.Annotation("MySql:CharSet", "utf8mb4"),
FutureWork = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"),
FutureWorkReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่")
.Annotation("MySql:CharSet", "utf8mb4"),
Suggestion = table.Column<string>(type: "longtext", nullable: true, comment: "ความคิดเห็นและข้อเสนอแนะอื่น ๆ ")
.Annotation("MySql:CharSet", "utf8mb4"),
AppointDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"),
Score1 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 1"),
Score2 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 2"),
Score3 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 3"),
Score4 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 4"),
Score5 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 5"),
Score6 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 6"),
Score7 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 7"),
Score8 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 8"),
Score9 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 9"),
Score10 = table.Column<int>(type: "int", nullable: true, comment: "คะแนนข้อ 10"),
ScoreTotal = table.Column<int>(type: "int", nullable: true, comment: "คะแนนรวม"),
Comment = table.Column<string>(type: "longtext", nullable: true, comment: "ความคิดเห็น")
.Annotation("MySql:CharSet", "utf8mb4"),
root = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4"),
rootId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4"),
rootDnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4"),
child1 = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child1Id = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child1DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child2 = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child2Id = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child2DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child3 = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child3Id = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child3DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child4 = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child4Id = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4"),
child4DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementEmployeeQuestions", x => x.Id);
table.ForeignKey(
name: "FK_RetirementEmployeeQuestions_RetirementResignEmployees_Retire~",
column: x => x.RetirementResignEmployeeId,
principalTable: "RetirementResignEmployees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_RetirementEmployeeQuestions_RetirementResignEmployeeId",
table: "RetirementEmployeeQuestions",
column: "RetirementResignEmployeeId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RetirementEmployeeQuestions");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementResignEmployeeCancels");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementResignEmployeeCancels");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementResignEmployeeCancels");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementResignEmployeeCancels");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementResignEmployeeCancels");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementResignCancels");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementResignCancels");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementResignCancels");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementResignCancels");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementResignCancels");
migrationBuilder.DropColumn(
name: "child1",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child1Id",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child2",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child2Id",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child3",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child3Id",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child4",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "child4Id",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "root",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "RetirementQuestions");
migrationBuilder.DropColumn(
name: "rootId",
table: "RetirementQuestions");
}
}
}

View file

@ -15186,6 +15186,239 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementDischarges");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Adjust")
.HasColumnType("longtext")
.HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง");
b.Property<string>("AdjustOther")
.HasColumnType("longtext")
.HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง");
b.Property<DateTime?>("AppointDate")
.HasColumnType("datetime(6)")
.HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก");
b.Property<string>("Comment")
.HasColumnType("longtext")
.HasComment("ความคิดเห็น");
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<string>("ExitFactor")
.HasColumnType("longtext")
.HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ");
b.Property<string>("ExitFactorOther")
.HasColumnType("longtext")
.HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ");
b.Property<bool?>("FutureWork")
.HasColumnType("tinyint(1)")
.HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่");
b.Property<string>("FutureWorkReason")
.HasColumnType("longtext")
.HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่");
b.Property<bool?>("Havejob")
.HasColumnType("tinyint(1)")
.HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร");
b.Property<string>("HavejobReason")
.HasColumnType("longtext")
.HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร");
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>("NotExitFactor")
.HasColumnType("longtext")
.HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร");
b.Property<string>("RealReason")
.HasColumnType("longtext")
.HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร");
b.Property<string>("ReasonWork")
.HasColumnType("longtext")
.HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร");
b.Property<string>("ReasonWorkOther")
.HasColumnType("longtext")
.HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร");
b.Property<Guid>("RetirementResignEmployeeId")
.HasColumnType("char(36)");
b.Property<int?>("Score1")
.HasColumnType("int")
.HasComment("คะแนนข้อ 1");
b.Property<int?>("Score10")
.HasColumnType("int")
.HasComment("คะแนนข้อ 10");
b.Property<int?>("Score2")
.HasColumnType("int")
.HasComment("คะแนนข้อ 2");
b.Property<int?>("Score3")
.HasColumnType("int")
.HasComment("คะแนนข้อ 3");
b.Property<int?>("Score4")
.HasColumnType("int")
.HasComment("คะแนนข้อ 4");
b.Property<int?>("Score5")
.HasColumnType("int")
.HasComment("คะแนนข้อ 5");
b.Property<int?>("Score6")
.HasColumnType("int")
.HasComment("คะแนนข้อ 6");
b.Property<int?>("Score7")
.HasColumnType("int")
.HasComment("คะแนนข้อ 7");
b.Property<int?>("Score8")
.HasColumnType("int")
.HasComment("คะแนนข้อ 8");
b.Property<int?>("Score9")
.HasColumnType("int")
.HasComment("คะแนนข้อ 9");
b.Property<int?>("ScoreTotal")
.HasColumnType("int")
.HasComment("คะแนนรวม");
b.Property<bool?>("SuggestFriends")
.HasColumnType("tinyint(1)")
.HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่");
b.Property<string>("SuggestFriendsReason")
.HasColumnType("longtext")
.HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่");
b.Property<string>("Suggestion")
.HasColumnType("longtext")
.HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ ");
b.Property<int?>("TimeThink")
.HasColumnType("int")
.HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 ");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 ");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 ");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 ");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root ");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.HasKey("Id");
b.HasIndex("RetirementResignEmployeeId");
b.ToTable("RetirementEmployeeQuestions");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b =>
{
b.Property<Guid>("Id")
@ -16565,6 +16798,66 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("int")
.HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 ");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 ");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 ");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 ");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root ");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.HasKey("Id");
b.HasIndex("RetirementResignId");
@ -17589,6 +17882,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะลาออก");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -17601,6 +17898,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -17613,6 +17914,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -17625,6 +17930,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -17693,6 +18002,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -18546,6 +18859,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะลาออก");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -18558,6 +18875,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -18570,6 +18891,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -18582,6 +18907,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -18634,6 +18963,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -20340,6 +20673,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("Profile");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee")
.WithMany()
.HasForeignKey("RetirementResignEmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResignEmployee");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b =>
{
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")

View file

@ -0,0 +1,198 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class update_table_discipline_add_dna : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1Id",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2Id",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3Id",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4Id",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "root",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootId",
table: "DisciplineComplaint_Appeals",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child1Id",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child2",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child2Id",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child3",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child3Id",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child4",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "child4Id",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "root",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "DisciplineComplaint_Appeals");
migrationBuilder.DropColumn(
name: "rootId",
table: "DisciplineComplaint_Appeals");
}
}
}

View file

@ -245,10 +245,70 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("int")
.HasComment("ปีงบประมาณ");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("profileType")
.HasColumnType("longtext")
.HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.HasKey("Id");
b.ToTable("DisciplineComplaint_Appeals");