retire add approve

This commit is contained in:
moss 2025-05-07 14:17:28 +07:00
parent 8ce58201e9
commit 2b8713cbe0
19 changed files with 22944 additions and 43 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,259 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class update_table_retirement_add_approver : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ApproveStep",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "ApproveStep",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RetirementResignApprovers",
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"),
RetirementResignId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Seq = table.Column<int>(type: "int", nullable: false),
Prefix = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PositionName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
KeycloakId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ApproveStatus = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Comment = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ApproveType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementResignApprovers", x => x.Id);
table.ForeignKey(
name: "FK_RetirementResignApprovers_RetirementResigns_RetirementResign~",
column: x => x.RetirementResignId,
principalTable: "RetirementResigns",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RetirementResignCancelApprovers",
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"),
RetirementResignCancelId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Seq = table.Column<int>(type: "int", nullable: false),
Prefix = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PositionName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
KeycloakId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ApproveStatus = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Comment = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ApproveType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementResignCancelApprovers", x => x.Id);
table.ForeignKey(
name: "FK_RetirementResignCancelApprovers_RetirementResignCancels_Reti~",
column: x => x.RetirementResignCancelId,
principalTable: "RetirementResignCancels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RetirementResignEmployeeApprovers",
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"),
Seq = table.Column<int>(type: "int", nullable: false),
Prefix = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PositionName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
KeycloakId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ApproveStatus = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Comment = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ApproveType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementResignEmployeeApprovers", x => x.Id);
table.ForeignKey(
name: "FK_RetirementResignEmployeeApprovers_RetirementResignEmployees_~",
column: x => x.RetirementResignEmployeeId,
principalTable: "RetirementResignEmployees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RetirementResignEmployeeCancelApprovers",
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"),
RetirementResignEmployeeCancelId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Seq = table.Column<int>(type: "int", nullable: false),
Prefix = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PositionName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
KeycloakId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ApproveStatus = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Comment = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ApproveType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementResignEmployeeCancelApprovers", x => x.Id);
table.ForeignKey(
name: "FK_RetirementResignEmployeeCancelApprovers_RetirementResignEmpl~",
column: x => x.RetirementResignEmployeeCancelId,
principalTable: "RetirementResignEmployeeCancels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_RetirementResignApprovers_RetirementResignId",
table: "RetirementResignApprovers",
column: "RetirementResignId");
migrationBuilder.CreateIndex(
name: "IX_RetirementResignCancelApprovers_RetirementResignCancelId",
table: "RetirementResignCancelApprovers",
column: "RetirementResignCancelId");
migrationBuilder.CreateIndex(
name: "IX_RetirementResignEmployeeApprovers_RetirementResignEmployeeId",
table: "RetirementResignEmployeeApprovers",
column: "RetirementResignEmployeeId");
migrationBuilder.CreateIndex(
name: "IX_RetirementResignEmployeeCancelApprovers_RetirementResignEmpl~",
table: "RetirementResignEmployeeCancelApprovers",
column: "RetirementResignEmployeeCancelId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RetirementResignApprovers");
migrationBuilder.DropTable(
name: "RetirementResignCancelApprovers");
migrationBuilder.DropTable(
name: "RetirementResignEmployeeApprovers");
migrationBuilder.DropTable(
name: "RetirementResignEmployeeCancelApprovers");
migrationBuilder.DropColumn(
name: "ApproveStep",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "ApproveStep",
table: "RetirementResignEmployees");
}
}
}

View file

@ -16764,6 +16764,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติ");
b.Property<string>("ApproveStep")
.HasColumnType("longtext")
.HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ");
b.Property<string>("CancelReason")
.HasColumnType("longtext")
.HasComment("เหตุผลยกเลิก");
@ -17059,6 +17063,99 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementResigns");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ApproveStatus")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ApproveType")
.HasColumnType("longtext");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("longtext");
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>("FirstName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("longtext");
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>("PositionName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Prefix")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("RetirementResignId")
.HasColumnType("char(36)");
b.Property<int>("Seq")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RetirementResignId");
b.ToTable("RetirementResignApprovers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
{
b.Property<Guid>("Id")
@ -17352,6 +17449,99 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementResignCancels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ApproveStatus")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ApproveType")
.HasColumnType("longtext");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("longtext");
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>("FirstName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("longtext");
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>("PositionName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Prefix")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("RetirementResignCancelId")
.HasColumnType("char(36)");
b.Property<int>("Seq")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RetirementResignCancelId");
b.ToTable("RetirementResignCancelApprovers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b =>
{
b.Property<Guid>("Id")
@ -17497,6 +17687,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติ");
b.Property<string>("ApproveStep")
.HasColumnType("longtext")
.HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ");
b.Property<string>("CancelReason")
.HasColumnType("longtext")
.HasComment("เหตุผลยกเลิก");
@ -17788,6 +17982,99 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementResignEmployees");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ApproveStatus")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ApproveType")
.HasColumnType("longtext");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("longtext");
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>("FirstName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("longtext");
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>("PositionName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Prefix")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("RetirementResignEmployeeId")
.HasColumnType("char(36)");
b.Property<int>("Seq")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RetirementResignEmployeeId");
b.ToTable("RetirementResignEmployeeApprovers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b =>
{
b.Property<Guid>("Id")
@ -18077,6 +18364,99 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementResignEmployeeCancels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ApproveStatus")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ApproveType")
.HasColumnType("longtext");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("longtext");
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>("FirstName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("longtext");
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>("PositionName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Prefix")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("RetirementResignEmployeeCancelId")
.HasColumnType("char(36)");
b.Property<int>("Seq")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RetirementResignEmployeeCancelId");
b.ToTable("RetirementResignEmployeeCancelApprovers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b =>
{
b.Property<Guid>("Id")
@ -19762,6 +20142,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementPeriod");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign")
.WithMany("Approvers")
.HasForeignKey("RetirementResignId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResign");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign")
@ -19773,6 +20164,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementResign");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel")
.WithMany("Approvers")
.HasForeignKey("RetirementResignCancelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResignCancel");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
@ -19811,6 +20213,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementResign");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee")
.WithMany("Approvers")
.HasForeignKey("RetirementResignEmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResignEmployee");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee")
@ -19822,6 +20235,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementResignEmployee");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel")
.WithMany("Approvers")
.HasForeignKey("RetirementResignEmployeeCancelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResignEmployeeCancel");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
@ -20133,6 +20557,8 @@ namespace BMA.EHR.Infrastructure.Migrations
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b =>
{
b.Navigation("Approvers");
b.Navigation("RetirementResignCancels");
b.Navigation("RetirementResignDebtDocs");
@ -20140,14 +20566,26 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementResignDocs");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
{
b.Navigation("Approvers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b =>
{
b.Navigation("Approvers");
b.Navigation("RetirementResignEmployeeCancels");
b.Navigation("RetirementResignEmployeeDebtDocs");
b.Navigation("RetirementResignEmployeeDocs");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b =>
{
b.Navigation("Approvers");
});
#pragma warning restore 612, 618
}
}

View file

@ -334,6 +334,10 @@ namespace BMA.EHR.Infrastructure.Persistence
public DbSet<RetirementDeceased> RetirementDeceaseds { get; set; }
public DbSet<RetirementDeceasedNoti> RetirementDeceasedNotis { get; set; }
public DbSet<RetirementResign> RetirementResigns { get; set; }
public DbSet<RetirementResignApprover> RetirementResignApprovers { get; set; }
public DbSet<RetirementResignCancelApprover> RetirementResignCancelApprovers { get; set; }
public DbSet<RetirementResignEmployeeApprover> RetirementResignEmployeeApprovers { get; set; }
public DbSet<RetirementResignEmployeeCancelApprover> RetirementResignEmployeeCancelApprovers { get; set; }
public DbSet<RetirementResignCancel> RetirementResignCancels { get; set; }
public DbSet<RetirementResignDoc> RetirementResignDocs { get; set; }
public DbSet<RetirementResignDebtDoc> RetirementResignDebtDocs { get; set; }