no message

This commit is contained in:
kittapath 2024-10-29 17:48:41 +07:00
parent 248d400666
commit 6f3d6f9d72
12 changed files with 19409 additions and 75 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,156 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableRetirementResignCancel : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "RetirementResignCancels",
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"),
Location = table.Column<string>(type: "longtext", nullable: true, comment: "สถานที่ยื่นขอลาออกราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
SendDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ยื่นขอออกราชการ"),
ActiveDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ขอออกราชการ"),
Reason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลที่ลาออกจากราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
OrganizationPositionOld = table.Column<string>(type: "longtext", nullable: true, comment: "สังกัด")
.Annotation("MySql:CharSet", "utf8mb4"),
PositionTypeOld = table.Column<string>(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")
.Annotation("MySql:CharSet", "utf8mb4"),
PositionLevelOld = table.Column<string>(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ")
.Annotation("MySql:CharSet", "utf8mb4"),
PositionNumberOld = table.Column<string>(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่")
.Annotation("MySql:CharSet", "utf8mb4"),
AmountOld = table.Column<double>(type: "double", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"),
Status = table.Column<string>(type: "longtext", nullable: true, comment: "สถานะลาออก")
.Annotation("MySql:CharSet", "utf8mb4"),
ApproveReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติ")
.Annotation("MySql:CharSet", "utf8mb4"),
RejectReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลไม่อนุมัติ")
.Annotation("MySql:CharSet", "utf8mb4"),
CancelReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลยกเลิก")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
IsNoDebt = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะไม่เป็นหนี้สหกรณ์"),
IsNoBurden = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"),
IsDiscipline = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะพฤติการณ์ทางวินัย"),
OligarchReject = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้ดูแล"),
OligarchApproveReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้ดูแล")
.Annotation("MySql:CharSet", "utf8mb4"),
OligarchRejectReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้ดูแล")
.Annotation("MySql:CharSet", "utf8mb4"),
OligarchRejectDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้ดูแล"),
CommanderReject = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้บังคับบัญชา"),
CommanderApproveReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้บังคับบัญชา")
.Annotation("MySql:CharSet", "utf8mb4"),
CommanderRejectReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้บังคับบัญชา")
.Annotation("MySql:CharSet", "utf8mb4"),
CommanderRejectDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้บังคับบัญชา"),
OfficerReject = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งการเจ้าหน้าที่"),
OfficerApproveReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติการเจ้าหน้าที่")
.Annotation("MySql:CharSet", "utf8mb4"),
OfficerRejectReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งการเจ้าหน้าที่")
.Annotation("MySql:CharSet", "utf8mb4"),
OfficerRejectDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งการเจ้าหน้าที่"),
RemarkHorizontal = table.Column<string>(type: "longtext", nullable: true, comment: "หมายเหตุแนวนอน")
.Annotation("MySql:CharSet", "utf8mb4"),
OrganizationOld = table.Column<string>(type: "longtext", nullable: true, comment: "สังกัดเดิม")
.Annotation("MySql:CharSet", "utf8mb4"),
PositionOld = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่งเดิม")
.Annotation("MySql:CharSet", "utf8mb4"),
profileId = table.Column<string>(type: "longtext", nullable: true, comment: "profile Id")
.Annotation("MySql:CharSet", "utf8mb4"),
prefix = table.Column<string>(type: "longtext", nullable: true, comment: "คำนำหน้า")
.Annotation("MySql:CharSet", "utf8mb4"),
firstName = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อ")
.Annotation("MySql:CharSet", "utf8mb4"),
lastName = table.Column<string>(type: "longtext", nullable: true, comment: "นามสกุล")
.Annotation("MySql:CharSet", "utf8mb4"),
citizenId = table.Column<string>(type: "longtext", nullable: true, comment: "เลขบัตรประชาชน")
.Annotation("MySql:CharSet", "utf8mb4"),
rootOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4"),
rootOldId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4"),
rootShortNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4"),
child1Old = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child1OldId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child1ShortNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child2Old = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child2OldId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child2ShortNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child3Old = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child3OldId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child3ShortNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child4Old = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child4OldId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4"),
child4ShortNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4"),
posMasterNoOld = table.Column<int>(type: "int", nullable: true, comment: "เลขที่ตำแหน่ง old"),
posTypeOldId = table.Column<string>(type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง old")
.Annotation("MySql:CharSet", "utf8mb4"),
posTypeNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง old")
.Annotation("MySql:CharSet", "utf8mb4"),
posLevelOldId = table.Column<string>(type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง old")
.Annotation("MySql:CharSet", "utf8mb4"),
posLevelNameOld = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง old")
.Annotation("MySql:CharSet", "utf8mb4"),
RetirementResignId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RetirementResignCancels", x => x.Id);
table.ForeignKey(
name: "FK_RetirementResignCancels_RetirementResigns_RetirementResignId",
column: x => x.RetirementResignId,
principalTable: "RetirementResigns",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_RetirementResignCancels_RetirementResignId",
table: "RetirementResignCancels",
column: "RetirementResignId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RetirementResignCancels");
}
}
}

View file

@ -16076,6 +16076,291 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("RetirementResigns");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime?>("ActiveDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ขอออกราชการ");
b.Property<double?>("AmountOld")
.HasColumnType("double")
.HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน");
b.Property<string>("ApproveReason")
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติ");
b.Property<string>("CancelReason")
.HasColumnType("longtext")
.HasComment("เหตุผลยกเลิก");
b.Property<string>("CommanderApproveReason")
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติผู้บังคับบัญชา");
b.Property<bool?>("CommanderReject")
.HasColumnType("tinyint(1)")
.HasComment("สถานะยับยั้งผู้บังคับบัญชา");
b.Property<DateTime?>("CommanderRejectDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ยับยั้งผู้บังคับบัญชา");
b.Property<string>("CommanderRejectReason")
.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<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasComment("สถานะการใช้งาน");
b.Property<bool>("IsDiscipline")
.HasColumnType("tinyint(1)")
.HasComment("สถานะพฤติการณ์ทางวินัย");
b.Property<bool>("IsNoBurden")
.HasColumnType("tinyint(1)")
.HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา");
b.Property<bool>("IsNoDebt")
.HasColumnType("tinyint(1)")
.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>("Location")
.HasColumnType("longtext")
.HasComment("สถานที่ยื่นขอลาออกราชการ");
b.Property<string>("OfficerApproveReason")
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติการเจ้าหน้าที่");
b.Property<bool?>("OfficerReject")
.HasColumnType("tinyint(1)")
.HasComment("สถานะยับยั้งการเจ้าหน้าที่");
b.Property<DateTime?>("OfficerRejectDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ยับยั้งการเจ้าหน้าที่");
b.Property<string>("OfficerRejectReason")
.HasColumnType("longtext")
.HasComment("เหตุผลยับยั้งการเจ้าหน้าที่");
b.Property<string>("OligarchApproveReason")
.HasColumnType("longtext")
.HasComment("เหตุผลอนุมัติผู้ดูแล");
b.Property<bool?>("OligarchReject")
.HasColumnType("tinyint(1)")
.HasComment("สถานะยับยั้งผู้ดูแล");
b.Property<DateTime?>("OligarchRejectDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ยับยั้งผู้ดูแล");
b.Property<string>("OligarchRejectReason")
.HasColumnType("longtext")
.HasComment("เหตุผลยับยั้งผู้ดูแล");
b.Property<string>("OrganizationOld")
.HasColumnType("longtext")
.HasComment("สังกัดเดิม");
b.Property<string>("OrganizationPositionOld")
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<string>("PositionLevelOld")
.HasColumnType("longtext")
.HasComment("ข้อมูลหน่วยงานเดิม ระดับ");
b.Property<string>("PositionNumberOld")
.HasColumnType("longtext")
.HasComment("ข้อมูลหน่วยงานเดิม เลขที่");
b.Property<string>("PositionOld")
.HasColumnType("longtext")
.HasComment("ตำแหน่งเดิม");
b.Property<string>("PositionTypeOld")
.HasColumnType("longtext")
.HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท");
b.Property<string>("Reason")
.HasColumnType("longtext")
.HasComment("เหตุผลที่ลาออกจากราชการ");
b.Property<string>("RejectReason")
.HasColumnType("longtext")
.HasComment("เหตุผลไม่อนุมัติ");
b.Property<string>("RemarkHorizontal")
.HasColumnType("longtext")
.HasComment("หมายเหตุแนวนอน");
b.Property<Guid>("RetirementResignId")
.HasColumnType("char(36)");
b.Property<DateTime?>("SendDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ยื่นขอออกราชการ");
b.Property<string>("Status")
.HasColumnType("longtext")
.HasComment("สถานะลาออก");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
b.Property<string>("child1OldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1ShortNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
b.Property<string>("child2OldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2ShortNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
b.Property<string>("child3OldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3ShortNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
b.Property<string>("child4OldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4ShortNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4 old");
b.Property<string>("citizenId")
.HasColumnType("longtext")
.HasComment("เลขบัตรประชาชน");
b.Property<string>("firstName")
.HasColumnType("longtext")
.HasComment("ชื่อ");
b.Property<string>("lastName")
.HasColumnType("longtext")
.HasComment("นามสกุล");
b.Property<string>("posLevelNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง old");
b.Property<string>("posLevelOldId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง old");
b.Property<int?>("posMasterNoOld")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง old");
b.Property<string>("posTypeNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง old");
b.Property<string>("posTypeOldId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง old");
b.Property<string>("prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
b.Property<string>("profileId")
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
b.Property<string>("rootOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root old");
b.Property<string>("rootShortNameOld")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root old");
b.HasKey("Id");
b.HasIndex("RetirementResignId");
b.ToTable("RetirementResignCancels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b =>
{
b.Property<Guid>("Id")
@ -17794,6 +18079,17 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("RetirementResign");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign")
.WithMany()
.HasForeignKey("RetirementResignId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RetirementResign");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")

View file

@ -330,6 +330,7 @@ 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<RetirementResignCancel> RetirementResignCancels { get; set; }
public DbSet<RetirementResignDoc> RetirementResignDocs { get; set; }
public DbSet<RetirementResignDebtDoc> RetirementResignDebtDocs { get; set; }
public DbSet<RetirementOut> RetirementOuts { get; set; }