Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
533adedf49
24 changed files with 31960 additions and 429 deletions
9916
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231123094644_add table DisciplineInvestigate.Designer.cs
generated
Normal file
9916
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231123094644_add table DisciplineInvestigate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,330 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addtableDisciplineInvestigate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RejectReason",
|
||||
table: "DisciplineComplaints");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Result",
|
||||
table: "DisciplineComplaints",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ผลการตรวจสอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigates",
|
||||
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"),
|
||||
Status = table.Column<string>(type: "longtext", nullable: false, comment: "สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
RespondentType = table.Column<string>(type: "longtext", nullable: false, comment: "ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Title = table.Column<string>(type: "text", nullable: false, comment: "เรื่องที่ร้องเรียน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "text", nullable: false, comment: "รายละเอียดของเรื่องร้องเรียน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DateReceived = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"),
|
||||
LevelConsideration = table.Column<string>(type: "longtext", nullable: false, comment: "ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DateConsideration = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่กำหนดพิจารณา"),
|
||||
OffenseDetails = table.Column<string>(type: "longtext", nullable: false, comment: "ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DateNotification = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วันแจ้งเตือนล่วงหน้า"),
|
||||
ComplaintFrom = table.Column<string>(type: "longtext", nullable: false, comment: "รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Appellant = table.Column<string>(type: "longtext", nullable: false, comment: "ผู้ร้องเรียน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ResultComplaint = table.Column<string>(type: "longtext", nullable: true, comment: "ผลการตรวจสอบเรื่องร้องเรียน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Result = table.Column<string>(type: "longtext", nullable: true, comment: "ผลการตรวจสอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Organization = table.Column<Guid>(type: "char(36)", nullable: true, comment: "กรณีหน่วยงานใส่ id ของหน่วยงาน", collation: "ascii_general_ci"),
|
||||
ConsideredAgency = table.Column<Guid>(type: "char(36)", nullable: false, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", collation: "ascii_general_ci"),
|
||||
InvestigationDetail = table.Column<string>(type: "longtext", nullable: true, comment: "ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InvestigationDetailOther = table.Column<string>(type: "longtext", nullable: true, comment: "ลักษณะการสืบสวนกรณีเลือกอื่นๆ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InvestigationDateStart = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่เริ่มการสอบสวน"),
|
||||
InvestigationDateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่สิ้นสุดการสอบสวน"),
|
||||
InvestigationDescription = table.Column<string>(type: "longtext", nullable: true, comment: "รายละเอียดเกี่ยวกับการสืบสวน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InvestigationStatusResult = table.Column<string>(type: "longtext", nullable: true, comment: "สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InvestigationCauseText = table.Column<string>(type: "longtext", nullable: true, comment: "กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DisciplineComplaintId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigates", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigates_DisciplineComplaints_DisciplineCompla~",
|
||||
column: x => x.DisciplineComplaintId,
|
||||
principalTable: "DisciplineComplaints",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigate_Directors",
|
||||
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"),
|
||||
DisciplineDirectorId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DisciplineComplaintId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigate_Directors", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineComplaints_Discipl~",
|
||||
column: x => x.DisciplineComplaintId,
|
||||
principalTable: "DisciplineComplaints",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineDirectors_Discipli~",
|
||||
column: x => x.DisciplineDirectorId,
|
||||
principalTable: "DisciplineDirectors",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineInvestigates_Disci~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id");
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigate_DocComplaints",
|
||||
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"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigate_DocComplaints", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_DocComplaints_DisciplineInvestigates_D~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_DocComplaints_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigate_Docs",
|
||||
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"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigate_Docs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Docs_DisciplineInvestigates_Discipline~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Docs_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigate_Profiles",
|
||||
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<Guid>(type: "char(36)", nullable: true, comment: "id อ้างอิง profile", collation: "ascii_general_ci"),
|
||||
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"),
|
||||
Organization = table.Column<string>(type: "longtext", nullable: true, comment: "สังกัด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Position = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
PosNo = table.Column<string>(type: "longtext", nullable: true, comment: "เลขที่ตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
PositionLevel = table.Column<string>(type: "longtext", nullable: true, comment: "ระดับ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Salary = table.Column<double>(type: "double", nullable: true, comment: "เงินเดือน"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigate_Profiles", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Profiles_DisciplineInvestigates_Discip~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Directors_DisciplineComplaintId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineComplaintId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Directors_DisciplineDirectorId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineDirectorId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Directors_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineInvestigateId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_DocComplaints_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_DocComplaints",
|
||||
column: "DisciplineInvestigateId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_DocComplaints_DocumentId",
|
||||
table: "DisciplineInvestigate_DocComplaints",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Docs_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_Docs",
|
||||
column: "DisciplineInvestigateId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Docs_DocumentId",
|
||||
table: "DisciplineInvestigate_Docs",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Profiles_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_Profiles",
|
||||
column: "DisciplineInvestigateId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigates_DisciplineComplaintId",
|
||||
table: "DisciplineInvestigates",
|
||||
column: "DisciplineComplaintId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigate_DocComplaints");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigate_Docs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigate_Profiles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Result",
|
||||
table: "DisciplineComplaints");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RejectReason",
|
||||
table: "DisciplineComplaints",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เหตุผลยุติเรื่อง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
9907
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231123100343_add table DisciplineInvestigate1.Designer.cs
generated
Normal file
9907
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231123100343_add table DisciplineInvestigate1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addtableDisciplineInvestigate1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineComplaints_Discipl~",
|
||||
table: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineInvestigates_Disci~",
|
||||
table: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_DisciplineInvestigate_Directors_DisciplineComplaintId",
|
||||
table: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DisciplineComplaintId",
|
||||
table: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineInvestigates_Disci~",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineInvestigateId",
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineInvestigates_Disci~",
|
||||
table: "DisciplineInvestigate_Directors");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DisciplineComplaintId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigate_Directors_DisciplineComplaintId",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineComplaintId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineComplaints_Discipl~",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineComplaintId",
|
||||
principalTable: "DisciplineComplaints",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DisciplineInvestigate_Directors_DisciplineInvestigates_Disci~",
|
||||
table: "DisciplineInvestigate_Directors",
|
||||
column: "DisciplineInvestigateId",
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addtableDisciplineInvestigateRelevantDocs : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DisciplineInvestigateRelevant_Docs",
|
||||
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"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DisciplineInvestigateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DisciplineInvestigateRelevant_Docs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigateRelevant_Docs_DisciplineInvestigates_Di~",
|
||||
column: x => x.DisciplineInvestigateId,
|
||||
principalTable: "DisciplineInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DisciplineInvestigateRelevant_Docs_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigateRelevant_Docs_DisciplineInvestigateId",
|
||||
table: "DisciplineInvestigateRelevant_Docs",
|
||||
column: "DisciplineInvestigateId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DisciplineInvestigateRelevant_Docs_DocumentId",
|
||||
table: "DisciplineInvestigateRelevant_Docs",
|
||||
column: "DocumentId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DisciplineInvestigateRelevant_Docs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -111,15 +111,15 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("char(36)")
|
||||
.HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
|
||||
|
||||
b.Property<string>("RejectReason")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลยุติเรื่อง");
|
||||
|
||||
b.Property<string>("RespondentType")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)");
|
||||
|
||||
b.Property<string>("Result")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลการตรวจสอบ");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
|
|
@ -438,6 +438,509 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.ToTable("DisciplineDirectors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Appellant")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผู้ร้องเรียน");
|
||||
|
||||
b.Property<string>("ComplaintFrom")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
|
||||
|
||||
b.Property<Guid>("ConsideredAgency")
|
||||
.HasColumnType("char(36)")
|
||||
.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<DateTime?>("DateConsideration")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่กำหนดพิจารณา");
|
||||
|
||||
b.Property<DateTime>("DateNotification")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันแจ้งเตือนล่วงหน้า");
|
||||
|
||||
b.Property<DateTime>("DateReceived")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasComment("รายละเอียดของเรื่องร้องเรียน");
|
||||
|
||||
b.Property<Guid>("DisciplineComplaintId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("InvestigationCauseText")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'");
|
||||
|
||||
b.Property<DateTime?>("InvestigationDateEnd")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สิ้นสุดการสอบสวน");
|
||||
|
||||
b.Property<DateTime?>("InvestigationDateStart")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เริ่มการสอบสวน");
|
||||
|
||||
b.Property<string>("InvestigationDescription")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดเกี่ยวกับการสืบสวน");
|
||||
|
||||
b.Property<string>("InvestigationDetail")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)");
|
||||
|
||||
b.Property<string>("InvestigationDetailOther")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ");
|
||||
|
||||
b.Property<string>("InvestigationStatusResult")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล");
|
||||
|
||||
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>("LevelConsideration")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)");
|
||||
|
||||
b.Property<string>("OffenseDetails")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
|
||||
|
||||
b.Property<Guid?>("Organization")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
|
||||
|
||||
b.Property<string>("RespondentType")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)");
|
||||
|
||||
b.Property<string>("Result")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลการตรวจสอบ");
|
||||
|
||||
b.Property<string>("ResultComplaint")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ผลการตรวจสอบเรื่องร้องเรียน");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasComment("เรื่องที่ร้องเรียน");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineComplaintId");
|
||||
|
||||
b.ToTable("DisciplineInvestigates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
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<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.ToTable("DisciplineInvestigateRelevant_Docs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
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<Guid>("DisciplineDirectorId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineDirectorId");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.ToTable("DisciplineInvestigate_Directors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
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<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.ToTable("DisciplineInvestigate_Docs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
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<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.ToTable("DisciplineInvestigate_DocComplaints");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Profile", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("CitizenId")
|
||||
.HasMaxLength(13)
|
||||
.HasColumnType("varchar(13)")
|
||||
.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<Guid>("DisciplineInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
.HasComment("ชื่อ");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
.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>("Organization")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สังกัด");
|
||||
|
||||
b.Property<Guid?>("PersonId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("id อ้างอิง profile");
|
||||
|
||||
b.Property<string>("PosNo")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เลขที่ตำแหน่ง");
|
||||
|
||||
b.Property<string>("Position")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่ง");
|
||||
|
||||
b.Property<string>("PositionLevel")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ระดับ");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คำนำหน้า");
|
||||
|
||||
b.Property<double?>("Salary")
|
||||
.HasColumnType("double")
|
||||
.HasComment("เงินเดือน");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineInvestigateId");
|
||||
|
||||
b.ToTable("DisciplineInvestigate_Profiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -8417,6 +8920,104 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.Navigation("DisciplineComplaint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint")
|
||||
.WithMany("DisciplineInvestigates")
|
||||
.HasForeignKey("DisciplineComplaintId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineComplaint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigateRelevant_Docs")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
|
||||
b.Navigation("Document");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector")
|
||||
.WithMany("DisciplineInvestigate_Directors")
|
||||
.HasForeignKey("DisciplineDirectorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigate_Directors")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineDirector");
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigate_Docs")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
|
||||
b.Navigation("Document");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigate_DocComplaints")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
|
||||
b.Navigation("Document");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Profile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate")
|
||||
.WithMany("DisciplineInvestigate_Profiles")
|
||||
.HasForeignKey("DisciplineInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineInvestigate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave")
|
||||
|
|
@ -9195,6 +9796,26 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.Navigation("DisciplineComplaint_Docs");
|
||||
|
||||
b.Navigation("DisciplineComplaint_Profiles");
|
||||
|
||||
b.Navigation("DisciplineInvestigates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b =>
|
||||
{
|
||||
b.Navigation("DisciplineInvestigate_Directors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b =>
|
||||
{
|
||||
b.Navigation("DisciplineInvestigateRelevant_Docs");
|
||||
|
||||
b.Navigation("DisciplineInvestigate_Directors");
|
||||
|
||||
b.Navigation("DisciplineInvestigate_DocComplaints");
|
||||
|
||||
b.Navigation("DisciplineInvestigate_Docs");
|
||||
|
||||
b.Navigation("DisciplineInvestigate_Profiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b =>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
public DbSet<DisciplineDirector> DisciplineDirectors { get; set; }
|
||||
public DbSet<DisciplineComplaint_Profile> DisciplineComplaint_Profiles { get; set; }
|
||||
public DbSet<DisciplineComplaint_Doc> DisciplineComplaint_Docs { get; set; }
|
||||
|
||||
public DbSet<DisciplineInvestigate> DisciplineInvestigates { get; set; }
|
||||
public DbSet<DisciplineInvestigate_Profile> DisciplineInvestigate_Profiles { get; set; }
|
||||
public DbSet<DisciplineInvestigate_DocComplaint> DisciplineInvestigate_DocComplaints { get; set; }
|
||||
public DbSet<DisciplineInvestigate_Doc> DisciplineInvestigate_Docs { get; set; }
|
||||
public DbSet<DisciplineInvestigate_Director> DisciplineInvestigate_Directors { get; set; }
|
||||
public DbSet<DisciplineInvestigateRelevant_Doc> DisciplineInvestigateRelevant_Docs { get; set; }
|
||||
public DbSet<Document> Documents { get; set; }
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue