hrms-api-backend/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250210034513_update table ProfileComplaintInvestigate.cs
2025-02-10 11:13:05 +07:00

68 lines
5.1 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetableProfileComplaintInvestigate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ProfileComplaintInvestigate",
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"),
PersonId = table.Column<string>(type: "longtext", nullable: true, comment: "id อ้างอิง profile")
.Annotation("MySql:CharSet", "utf8mb4"),
CitizenId = table.Column<string>(type: "varchar(13)", maxLength: 13, nullable: true, comment: "รหัสบัตรประชาชน")
.Annotation("MySql:CharSet", "utf8mb4"),
Prefix = table.Column<string>(type: "longtext", nullable: true, comment: "คำนำหน้า")
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อ")
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "นามสกุล")
.Annotation("MySql:CharSet", "utf8mb4"),
rootDnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4"),
child1DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4"),
child2DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4"),
child3DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4"),
child4DnaId = table.Column<string>(type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4"),
commandType = table.Column<string>(type: "longtext", nullable: true, comment: "ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)")
.Annotation("MySql:CharSet", "utf8mb4"),
profileType = table.Column<string>(type: "longtext", nullable: true, comment: "สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_ProfileComplaintInvestigate", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProfileComplaintInvestigate");
}
}
}