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