diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs
index ff4ef713..816fdda0 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs
@@ -125,6 +125,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
{
Status = p.Status,
CreatedAt = p.CreatedAt,
+ CreatedFullName = p.CreatedFullName,
}),
DisciplineComplaint_Appeal_Docs = x.DisciplineComplaint_Appeal_Docs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
})
diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs
index a7e9fb6d..ed63d87b 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs
@@ -113,6 +113,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
PersonId = p.PersonId,
PosNo = p.PosNo,
Organization = p.Organization,
+ IsSend = p.IsReport,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
ConsideredAgency = x.ConsideredAgency,//หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
@@ -193,11 +194,13 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
data.LastUpdateFullName = FullName ?? "System Administrator";
data.LastUpdateUserId = UserId ?? "";
data.LastUpdatedAt = DateTime.Now;
+ var hisprofile = data.DisciplineDisciplinary_ProfileComplaintInvestigates;
_context.DisciplineDisciplinary_ProfileComplaintInvestigates.RemoveRange(data.DisciplineDisciplinary_ProfileComplaintInvestigates);
if (data.RespondentType.Trim().ToUpper() == "PERSON")
{
foreach (var item in req.persons)
{
+ var isReport = hisprofile.Where(x => x.PersonId == item.personId).FirstOrDefault();
data.DisciplineDisciplinary_ProfileComplaintInvestigates.Add(
new DisciplineDisciplinary_ProfileComplaintInvestigate
{
@@ -212,6 +215,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
PersonId = item.personId,
PosNo = item.posNo,
Status = "NEW",
+ IsReport = isReport == null ? false : isReport.IsReport,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@@ -454,6 +458,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
PersonId = p.PersonId,
PosNo = p.PosNo,
Organization = p.Organization,
+ IsSend = p.IsReport,
Report = p.DisciplineReport_Profiles.Count() > 0 ? true : false,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
@@ -651,11 +656,13 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
}
data.Organization = req.organizationId;
data.RespondentType = req.respondentType;
+ var hisprofile = data.DisciplineDisciplinary_ProfileComplaintInvestigates;
_context.DisciplineDisciplinary_ProfileComplaintInvestigates.RemoveRange(data.DisciplineDisciplinary_ProfileComplaintInvestigates);
if (data.RespondentType.Trim().ToUpper() == "PERSON")
{
foreach (var item in req.persons)
{
+ var isReport = hisprofile.Where(x => x.PersonId == item.personId).FirstOrDefault();
data.DisciplineDisciplinary_ProfileComplaintInvestigates.Add(
new DisciplineDisciplinary_ProfileComplaintInvestigate
{
@@ -670,6 +677,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
PersonId = item.personId,
PosNo = item.posNo,
Status = "NEW",
+ IsReport = isReport == null ? false : isReport.IsReport,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@@ -1528,5 +1536,35 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
.ToListAsync();
return Success(data);
}
+
+ ///
+ /// สั่งรายชื่อไปออกคำสั่งยุตื
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("report")]
+ // [HttpPut("report/{commandTypeId:length(36)}")]
+ public async Task> PostToReport([FromBody] DisciplineProfileRequest req)
+ {
+ foreach (var item in req.Id)
+ {
+ var uppdated = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .FirstOrDefaultAsync(x => x.Id == item);
+ if (uppdated == null)
+ continue;
+
+ // uppdated.CommandTypeId = commandTypeId;
+ uppdated.IsReport = true;
+ uppdated.LastUpdateFullName = FullName ?? "System Administrator";
+ uppdated.LastUpdateUserId = UserId ?? "";
+ uppdated.LastUpdatedAt = DateTime.Now;
+ }
+
+ await _context.SaveChangesAsync();
+ return Success();
+ }
}
}
diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs
index c0d9e3f0..0eab6d3c 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs
@@ -110,6 +110,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
PersonId = p.PersonId,
PosNo = p.PosNo,
Organization = p.Organization,
+ IsSend = p.IsReport,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
ConsideredAgency = x.ConsideredAgency,//หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
@@ -189,11 +190,13 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
data.LastUpdateFullName = FullName ?? "System Administrator";
data.LastUpdateUserId = UserId ?? "";
data.LastUpdatedAt = DateTime.Now;
+ var hisprofile = data.DisciplineInvestigate_ProfileComplaints;
_context.DisciplineInvestigate_ProfileComplaints.RemoveRange(data.DisciplineInvestigate_ProfileComplaints);
if (data.RespondentType.Trim().ToUpper() == "PERSON")
{
foreach (var item in req.persons)
{
+ var isReport = hisprofile.Where(x => x.PersonId == item.personId).FirstOrDefault();
data.DisciplineInvestigate_ProfileComplaints.Add(
new DisciplineInvestigate_ProfileComplaint
{
@@ -207,6 +210,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
Salary = item.salary,
PersonId = item.personId,
PosNo = item.posNo,
+ IsReport = isReport == null ? false : isReport.IsReport,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@@ -284,6 +288,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
PersonId = p.PersonId,
PosNo = p.PosNo,
Organization = p.Organization,
+ IsSend = p.IsReport,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
DisciplineInvestigateDocs = x.DisciplineInvestigate_Docs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
@@ -423,11 +428,13 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
}
data.Organization = req.organizationId;
data.RespondentType = req.respondentType;
+ var hisprofile = data.DisciplineInvestigate_ProfileComplaints;
_context.DisciplineInvestigate_ProfileComplaints.RemoveRange(data.DisciplineInvestigate_ProfileComplaints);
if (data.RespondentType.Trim().ToUpper() == "PERSON")
{
foreach (var item in req.persons)
{
+ var isReport = hisprofile.Where(x => x.PersonId == item.personId).FirstOrDefault();
data.DisciplineInvestigate_ProfileComplaints.Add(
new DisciplineInvestigate_ProfileComplaint
{
@@ -441,6 +448,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
Salary = item.salary,
PersonId = item.personId,
PosNo = item.posNo,
+ IsReport = isReport == null ? false : isReport.IsReport,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@@ -563,6 +571,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
Position = item.Position,
PositionLevel = item.PositionLevel,
Status = "NEW",
+ IsReport = false,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@@ -939,5 +948,35 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
.ToListAsync();
return Success(data);
}
+
+ ///
+ /// สั่งรายชื่อไปออกคำสั่งยุตื
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("report")]
+ // [HttpPut("report/{commandTypeId:length(36)}")]
+ public async Task> PostToReport([FromBody] DisciplineProfileRequest req)
+ {
+ foreach (var item in req.Id)
+ {
+ var uppdated = await _context.DisciplineInvestigate_ProfileComplaints
+ .FirstOrDefaultAsync(x => x.Id == item);
+ if (uppdated == null)
+ continue;
+
+ // uppdated.CommandTypeId = commandTypeId;
+ uppdated.IsReport = true;
+ uppdated.LastUpdateFullName = FullName ?? "System Administrator";
+ uppdated.LastUpdateUserId = UserId ?? "";
+ uppdated.LastUpdatedAt = DateTime.Now;
+ }
+
+ await _context.SaveChangesAsync();
+ return Success();
+ }
}
}
diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
index 51a33f21..1dc62ba0 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
@@ -116,12 +116,44 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
ResultDescription = x.ResultDescription,//สรุปผลการพิจารณา
+ ResultOc = x.ResultOc,//
+ ResultDisciplineType = x.ResultDisciplineType,//
+ ResultTitleType = x.ResultTitleType,//
+ ResultYear = x.ResultYear,//
Status = x.Status,//สถานะหรือผลการสอบสวน
+ DisciplineDisciplinary_DocResults = x.DisciplineDisciplinary_DocResults.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
})
.Where(x => x.Id == id)
.FirstOrDefaultAsync();
if (_data == null)
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
+ var disciplineDisciplinary_DocResults = new List();
+ foreach (var doc in _data.DisciplineDisciplinary_DocResults)
+ {
+ var _doc = new
+ {
+ doc.Id,
+ doc.FileName,
+ PathName = await _documentService.ImagesPath(doc.Id)
+ };
+ disciplineDisciplinary_DocResults.Add(_doc);
+ }
+ var data = new
+ {
+ _data.Id,
+ _data.IdInvestigate,
+ _data.IdComplaint,
+ _data.RespondentType,
+ _data.Persons,
+ _data.OrganizationId,
+ _data.ResultDescription,
+ _data.ResultOc,
+ _data.ResultDisciplineType,
+ _data.ResultTitleType,
+ _data.ResultYear,
+ _data.Status,
+ disciplineDisciplinary_DocResults,
+ };
return Success(_data);
}
@@ -142,6 +174,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
data.ResultDescription = req.resultDescription;
+ data.ResultOc = req.oc;
+ data.ResultDisciplineType = req.disciplineType;
+ data.ResultTitleType = req.titleType;
+ data.ResultYear = req.year;
data.LastUpdateFullName = FullName ?? "System Administrator";
data.LastUpdateUserId = UserId ?? "";
data.LastUpdatedAt = DateTime.Now;
@@ -177,5 +213,88 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
await _context.SaveChangesAsync();
return Success();
}
+
+ ///
+ /// อัพไฟล์เอกสารสืบสวนวินัย
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPut("file/{id:guid}")]
+ public async Task> UploadFileDisciplineDisciplinaryInvestigate([FromForm] DisciplineFileRequest req, Guid id)
+ {
+ var data = await _context.DisciplineDisciplinarys
+ .Where(x => x.Id == id)
+ .FirstOrDefaultAsync();
+ if (data == null)
+ return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
+ // if (data.Status.Trim().ToUpper() != "NEW")
+ // return Error(new Exception("ไม่สามารถแก้ไขข้อมูลนี้ได้"), (int)StatusCodes.Status500InternalServerError);
+
+ if (Request.Form.Files != null && Request.Form.Files.Count != 0)
+ {
+ foreach (var file in Request.Form.Files)
+ {
+ var fileExtension = Path.GetExtension(file.FileName);
+ var doc = await _documentService.UploadFileAsync(file, file.FileName);
+ var _doc = await _context.Documents.AsQueryable()
+ .FirstOrDefaultAsync(x => x.Id == doc.Id);
+ if (_doc != null)
+ {
+ var disciplineDisciplinary_DocResult = new DisciplineDisciplinary_DocResult
+ {
+ DisciplineDisciplinary = data,
+ Document = _doc,
+ CreatedFullName = FullName ?? "System Administrator",
+ CreatedUserId = UserId ?? "",
+ CreatedAt = DateTime.Now,
+ LastUpdateFullName = FullName ?? "System Administrator",
+ LastUpdateUserId = UserId ?? "",
+ LastUpdatedAt = DateTime.Now,
+ };
+ await _context.DisciplineDisciplinary_DocResults.AddAsync(disciplineDisciplinary_DocResult);
+ }
+ }
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
+ ///
+ /// ลบไฟล์เอกสารสืบสวนวินัย
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpDelete("file/{id:guid}/{docId:guid}")]
+ public async Task> DeleteFileDisciplineDisciplinaryInvestigate(Guid id, Guid docId)
+ {
+ var data = await _context.DisciplineDisciplinarys
+ .Include(x => x.DisciplineDisciplinary_DocResults)
+ .ThenInclude(x => x.Document)
+ .Where(x => x.Id == id)
+ .FirstOrDefaultAsync();
+ if (data == null)
+ return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
+ // if (data.Status.Trim().ToUpper() != "NEW")
+ // return Error(new Exception("ไม่สามารถแก้ไขข้อมูลนี้ได้"), (int)StatusCodes.Status500InternalServerError);
+ var dataDoc = data.DisciplineDisciplinary_DocResults.Where(x => x.Document.Id == docId).FirstOrDefault();
+ if (dataDoc != null)
+ {
+ _context.DisciplineDisciplinary_DocResults.Remove(dataDoc);
+ await _context.SaveChangesAsync();
+ await _documentService.DeleteFileAsync(docId);
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ else
+ {
+ return Error(new Exception("ไม่พบไฟล์นี้ในระบบ"), (int)StatusCodes.Status404NotFound);
+ }
+ }
}
}
diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs
index a597281d..e0d5fb78 100644
--- a/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs
+++ b/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs
@@ -5,5 +5,9 @@ namespace BMA.EHR.Discipline.Service.Requests
public class DisciplineResultRequest
{
public string resultDescription { get; set; }// *สรุปผลการพิจารณา
+ public string? oc { get; set; }//
+ public string? disciplineType { get; set; }//
+ public string? titleType { get; set; }//
+ public int? year { get; set; }//
}
}
diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs
index e20bec97..21efb894 100644
--- a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs
+++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs
@@ -126,11 +126,20 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("สรุปผลการพิจารณา")]
public string? ResultDescription { get; set; }
+ [Comment("หน่วยงาย/ส่วนราชการ")]
+ public string? ResultOc { get; set; }
+ [Comment("ประเภทวินัย")]
+ public string? ResultDisciplineType { get; set; }
+ [Comment("ประเภทของเรื่อง")]
+ public string? ResultTitleType { get; set; }
+ [Comment("ปีงบประมาณ")]
+ public int? ResultYear { get; set; }
public DisciplineInvestigate DisciplineInvestigate { get; set; }
public virtual List DisciplineDisciplinary_ProfileComplaintInvestigates { get; set; } = new List();
public virtual List DisciplineDisciplinary_DocComplaintInvestigates { get; set; } = new List();
public virtual List DisciplineDisciplinary_DocInvestigates { get; set; } = new List();
+ public virtual List DisciplineDisciplinary_DocResults { get; set; } = new List();
public virtual List DisciplineDisciplinary_DocInvestigateRelevants { get; set; } = new List();
public virtual List DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List();
diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_DocResult.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_DocResult.cs
new file mode 100644
index 00000000..a6974a77
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_DocResult.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using BMA.EHR.Domain.Models.Base;
+using BMA.EHR.Domain.Models.Organizations;
+using Microsoft.EntityFrameworkCore;
+
+namespace BMA.EHR.Domain.Models.Discipline
+{
+ public class DisciplineDisciplinary_DocResult : EntityBase
+ {
+ [Required, Comment("อ้างอิงรหัสเอกสาร")]
+ public Document Document { get; set; }
+ [Required, Comment("อ้างอิงเรื่องสอบสวน")]
+ public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs
index 1e9a2058..d239a84c 100644
--- a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs
+++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs
@@ -33,6 +33,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Status { get; set; }
[Comment("ประเภทออกคำสั่ง")]
public Guid? CommandTypeId { get; set; }
+ [Comment("ส่งไปยุติเรื่อง")]
+ public bool IsReport { get; set; } = false;
[Required, Comment("Id เรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
public virtual List DisciplineReport_Profiles { get; set; } = new List();
diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs
index 47572169..8119eb34 100644
--- a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs
+++ b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs
@@ -29,6 +29,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
+ [Comment("ส่งไปยุติเรื่อง")]
+ public bool IsReport { get; set; } = false;
[Required, Comment("Id เรื่องสืบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231219021207_update table DisciplineComplaint_Appeals add isreport.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231219021207_update table DisciplineComplaint_Appeals add isreport.Designer.cs
new file mode 100644
index 00000000..9eada798
--- /dev/null
+++ b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20231219021207_update table DisciplineComplaint_Appeals add isreport.Designer.cs
@@ -0,0 +1,11722 @@
+//
+using System;
+using BMA.EHR.Infrastructure.Persistence;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
+{
+ [DbContext(typeof(DisciplineDbContext))]
+ [Migration("20231219021207_update table DisciplineComplaint_Appeals add isreport")]
+ partial class updatetableDisciplineComplaint_Appealsaddisreport
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.9")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("Appellant")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ผู้ร้องเรียน");
+
+ b.Property("ComplaintFrom")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
+
+ b.Property("ConsideredAgency")
+ .HasColumnType("char(36)")
+ .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DateConsideration")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่กำหนดพิจารณา");
+
+ b.Property("DateNotification")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันแจ้งเตือนล่วงหน้า");
+
+ b.Property("DateReceived")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("รายละเอียดของเรื่องร้องเรียน");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("LevelConsideration")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)");
+
+ b.Property("OffenseDetails")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
+
+ b.Property("Organization")
+ .HasColumnType("char(36)")
+ .HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
+
+ b.Property("RespondentType")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)");
+
+ b.Property("Result")
+ .HasColumnType("longtext")
+ .HasComment("ผลการตรวจสอบ");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("เรื่องที่ร้องเรียน");
+
+ b.HasKey("Id");
+
+ b.ToTable("DisciplineComplaints");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CaseNumber")
+ .HasColumnType("longtext")
+ .HasComment("คดีเลขที่");
+
+ b.Property("CaseType")
+ .HasColumnType("longtext")
+ .HasComment("ประเภทคดี");
+
+ b.Property("CitizenId")
+ .HasMaxLength(13)
+ .HasColumnType("varchar(13)")
+ .HasComment("รหัสบัตรประชาชน");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("Description")
+ .HasColumnType("text")
+ .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์");
+
+ b.Property("Fullname")
+ .HasColumnType("longtext")
+ .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("ProfileId")
+ .HasColumnType("char(36)")
+ .HasComment("ProfileId");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("สถานะอุทธรณ์/ร้องทุกข์");
+
+ b.Property("Title")
+ .HasColumnType("text")
+ .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์");
+
+ b.Property("Year")
+ .HasColumnType("int")
+ .HasComment("ปีงบประมาณ");
+
+ b.HasKey("Id");
+
+ b.ToTable("DisciplineComplaint_Appeals");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineComplaint_AppealId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineComplaint_AppealId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineComplaint_Appeal_Docs");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineComplaint_AppealId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("สถานะอุทธรณ์/ร้องทุกข์");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineComplaint_AppealId");
+
+ b.ToTable("DisciplineComplaint_Appeal_Historys");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ชื่อประเภทการร้องเรียน");
+
+ b.HasKey("Id");
+
+ b.ToTable("DisciplineComplaint_Channels");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineComplaintId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineComplaintId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineComplaint_Docs");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CitizenId")
+ .HasMaxLength(13)
+ .HasColumnType("varchar(13)")
+ .HasComment("รหัสบัตรประชาชน");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineComplaintId")
+ .HasColumnType("char(36)");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อ");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Organization")
+ .HasColumnType("longtext")
+ .HasComment("สังกัด");
+
+ b.Property("PersonId")
+ .HasColumnType("char(36)")
+ .HasComment("id อ้างอิง profile");
+
+ b.Property("PosNo")
+ .HasColumnType("longtext")
+ .HasComment("เลขที่ตำแหน่ง");
+
+ b.Property("Position")
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่ง");
+
+ b.Property("PositionLevel")
+ .HasColumnType("longtext")
+ .HasComment("ระดับ");
+
+ b.Property("Prefix")
+ .HasColumnType("longtext")
+ .HasComment("คำนำหน้า");
+
+ b.Property("Salary")
+ .HasColumnType("double")
+ .HasComment("เงินเดือน");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineComplaintId");
+
+ b.ToTable("DisciplineComplaint_Profiles");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("อีเมล");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ชื่อ");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("นามสกุล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Phone")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("เบอร์โทรศัพท์");
+
+ b.Property("Position")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่ง");
+
+ b.Property("Prefix")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("คำนำหน้าชื่อ");
+
+ b.HasKey("Id");
+
+ b.ToTable("DisciplineDirectors");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("Appellant")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ผู้ร้องเรียน");
+
+ b.Property("ComplaintFrom")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
+
+ b.Property("ConsideredAgency")
+ .HasColumnType("char(36)")
+ .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DateConsideration")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่กำหนดพิจารณา");
+
+ b.Property("DateNotification")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันแจ้งเตือนล่วงหน้า");
+
+ b.Property("DateReceived")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("รายละเอียดของเรื่องร้องเรียน");
+
+ b.Property("DisciplinaryCaseFault")
+ .HasColumnType("longtext")
+ .HasComment("กรณีความผิด");
+
+ b.Property("DisciplinaryCauseText")
+ .HasColumnType("longtext")
+ .HasComment("ผลการสอบสวน กรณีมีมูล");
+
+ b.Property("DisciplinaryDateAllegation")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่รับทราบข้อกล่าวหา");
+
+ b.Property("DisciplinaryDateEnd")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สิ้นสุดการสอบสวน");
+
+ b.Property("DisciplinaryDateEvident")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สรุปพยานหลักฐาน");
+
+ b.Property("DisciplinaryDateInvestigation")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่มีคำสั่งให้สอบสวน");
+
+ b.Property("DisciplinaryDateResult")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่รายงานผลการสอบสวน");
+
+ b.Property("DisciplinaryDateStart")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่เริ่มการสอบสวน");
+
+ b.Property("DisciplinaryDaysExtend")
+ .HasColumnType("int")
+ .HasComment("จำนวนวันที่ขยาย");
+
+ b.Property("DisciplinaryExtendStatus")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ขยายเวลา");
+
+ b.Property("DisciplinaryFaultLevel")
+ .HasColumnType("longtext")
+ .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก");
+
+ b.Property("DisciplinaryInvestigateAt")
+ .HasColumnType("longtext")
+ .HasComment("สอบสวนที่");
+
+ b.Property("DisciplinaryRecordAccuser")
+ .HasColumnType("longtext")
+ .HasComment("บันทึกถ้อยคำของผู้กล่าวหา");
+
+ b.Property("DisciplinaryRefLaw")
+ .HasColumnType("longtext")
+ .HasComment("อ้างอิงมาตราตามกฎหมาย");
+
+ b.Property("DisciplinaryResult")
+ .HasColumnType("longtext")
+ .HasComment("ผลการสอบสวน เหตุผล");
+
+ b.Property("DisciplinaryStatusResult")
+ .HasColumnType("longtext")
+ .HasComment("ผลการสอบสวน ผล");
+
+ b.Property("DisciplinarySummaryEvidence")
+ .HasColumnType("longtext")
+ .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา");
+
+ b.Property("DisciplinaryWitnesses")
+ .HasColumnType("longtext")
+ .HasComment("พยานและบันทึกถ้อยคำพยาน");
+
+ b.Property("DisciplineInvestigateId")
+ .HasColumnType("char(36)");
+
+ b.Property("InvestigationCauseText")
+ .HasColumnType("longtext")
+ .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'");
+
+ b.Property("InvestigationDateEnd")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สิ้นสุดการสืบสวน");
+
+ b.Property("InvestigationDateStart")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่เริ่มการสืบสวน");
+
+ b.Property("InvestigationDaysExtend")
+ .HasColumnType("int")
+ .HasComment("จำนวนวันที่ต้องการขยาย");
+
+ b.Property("InvestigationDescription")
+ .HasColumnType("longtext")
+ .HasComment("รายละเอียดเกี่ยวกับการสืบสวน");
+
+ b.Property("InvestigationDetail")
+ .HasColumnType("longtext")
+ .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)");
+
+ b.Property("InvestigationDetailOther")
+ .HasColumnType("longtext")
+ .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ");
+
+ b.Property("InvestigationExtendStatus")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ขยายเวลา");
+
+ b.Property("InvestigationStatusResult")
+ .HasColumnType("longtext")
+ .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("LevelConsideration")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)");
+
+ b.Property("OffenseDetails")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
+
+ b.Property("Organization")
+ .HasColumnType("char(36)")
+ .HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
+
+ b.Property("RespondentType")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)");
+
+ b.Property("Result")
+ .HasColumnType("longtext")
+ .HasComment("ผลการตรวจสอบ");
+
+ b.Property("ResultComplaint")
+ .HasColumnType("longtext")
+ .HasComment("ผลการตรวจสอบเรื่องร้องเรียน");
+
+ b.Property("ResultDescription")
+ .HasColumnType("longtext")
+ .HasComment("สรุปผลการพิจารณา");
+
+ b.Property("ResultInvestigate")
+ .HasColumnType("longtext")
+ .HasComment("ผลการตรวจสอบเรื่องสืบสวน");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("เรื่องที่ร้องเรียน");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineInvestigateId");
+
+ b.ToTable("DisciplineDisciplinarys");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DateEnd")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สิ้นสุด");
+
+ b.Property("DateStart")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่เริ่ม");
+
+ b.Property("DaysExtend")
+ .HasColumnType("int")
+ .HasComment("จำนวนวันที่การขยาย");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Name")
+ .HasColumnType("longtext")
+ .HasComment("ชื่อการขยาย");
+
+ b.Property("Num")
+ .HasColumnType("int")
+ .HasComment("ครั้งที่ขยาย");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.ToTable("DisciplineDisciplinaryExtends");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDirectorId")
+ .HasColumnType("char(36)");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDirectorId");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.ToTable("DisciplineDisciplinary_DirectorInvestigates");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocInvestigates");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocOthers");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocRecordAccusers");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DisciplineDisciplinaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineDisciplinaryId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("DisciplineDisciplinary_DocRelevants");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property