diff --git a/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs b/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs index 9a0342dc..874d36cf 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs @@ -22,10 +22,6 @@ public Guid RootId { get; set; } public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } public string? Root { get; set; } = string.Empty; diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs index e31c5c9a..f034f105 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs @@ -125,74 +125,14 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - // กรองสิทธิ์ - string role = jsonData["result"]?.ToString() ?? ""; - var profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), token.Replace("Bearer ", "")); - var node = profileAdmin?.Node; - string? nodeIdStr = null; - if (role == "NORMAL" || role == "CHILD") - { - nodeIdStr = node == 4 ? profileAdmin?.Child4DnaId - : node == 3 ? profileAdmin?.Child3DnaId - : node == 2 ? profileAdmin?.Child2DnaId - : node == 1 ? profileAdmin?.Child1DnaId - : node == 0 ? profileAdmin?.RootDnaId - : null; - } - else if (role == "BROTHER") - { - nodeIdStr = node == 4 ? profileAdmin?.Child3DnaId - : node == 3 ? profileAdmin?.Child2DnaId - : node == 2 ? profileAdmin?.Child1DnaId - : (node == 1 || node == 0) ? profileAdmin?.RootDnaId - : null; - } - else if (role == "ROOT") - { - nodeIdStr = profileAdmin?.RootDnaId; - } - Guid? nodeId = Guid.TryParse(nodeIdStr, out var ng) ? ng : (Guid?)null; - var page = req.page <= 0 ? 1 : req.page; var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; var data_search = (from x in _context.DisciplineComplaints - where - ( - x.Title.Contains(keyword) || - (x.Appellant == null ? false : x.Appellant.Contains(keyword)) - ) - && - ( - role == "OWNER" ? true : - role == "ROOT" ? x.RootDnaId == nodeId : - role == "CHILD" ? ( - node == 4 ? x.Child4DnaId == nodeId : - node == 3 ? x.Child3DnaId == nodeId : - node == 2 ? x.Child2DnaId == nodeId : - node == 1 ? x.Child1DnaId == nodeId : - node == 0 ? x.RootDnaId == nodeId : - true - ) : - role == "BROTHER" ? ( - node == 4 ? x.Child3DnaId == nodeId : - node == 3 ? x.Child2DnaId == nodeId : - node == 2 ? x.Child1DnaId == nodeId : - (node == 1 || node == 0) ? x.RootDnaId == nodeId : - true - ) : - role == "NORMAL" ? ( - node == 0 ? x.RootDnaId == nodeId && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == nodeId && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == nodeId && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == nodeId && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == nodeId : - true - ) : - true - ) + where x.Title.Contains(keyword) || + (x.Appellant == null ? false : x.Appellant.Contains(keyword)) select x).ToList(); if (status.Trim().ToUpper() != "ALL") @@ -526,10 +466,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers Description = req.description, DateReceived = req.dateReceived, RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, LevelConsideration = req.levelConsideration == null ? null : req.levelConsideration.Trim().ToUpper(), DateConsideration = req.dateConsideration, OffenseDetails = req.offenseDetails == null ? null : req.offenseDetails.Trim().ToUpper(), @@ -803,10 +739,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers RespondentType = data.RespondentType.Trim().ToUpper(), Organization = data.Organization, RootDnaId = data.RootDnaId, - Child1DnaId = data.Child1DnaId, - Child2DnaId = data.Child2DnaId, - Child3DnaId = data.Child3DnaId, - Child4DnaId = data.Child4DnaId, ConsideredAgency = data.ConsideredAgency, OrganizationId = data.OrganizationId, ConsideredAgencyId = data.ConsideredAgencyId, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs index d8623b98..b3de6c5b 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs @@ -30,14 +30,12 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers private readonly IHttpContextAccessor _httpContextAccessor; private readonly NotificationRepository _repositoryNoti; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; public DisciplineDisciplinaryController(DisciplineDbContext context, MinIODisciplineService documentService, NotificationRepository repositoryNoti, IHttpContextAccessor httpContextAccessor, - PermissionRepository permission, - UserProfileRepository userProfileRepository) + PermissionRepository permission) { // _repository = repository; _context = context; @@ -45,7 +43,6 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers _httpContextAccessor = httpContextAccessor; _repositoryNoti = repositoryNoti; _permission = permission; - _userProfileRepository = userProfileRepository; } #region " Properties " @@ -53,7 +50,6 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -122,75 +118,15 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - // กรองสิทธิ์ - string role = jsonData["result"]?.ToString() ?? ""; - var profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), token.Replace("Bearer ", "")); - var node = profileAdmin?.Node; - string? nodeIdStr = null; - if (role == "NORMAL" || role == "CHILD") - { - nodeIdStr = node == 4 ? profileAdmin?.Child4DnaId - : node == 3 ? profileAdmin?.Child3DnaId - : node == 2 ? profileAdmin?.Child2DnaId - : node == 1 ? profileAdmin?.Child1DnaId - : node == 0 ? profileAdmin?.RootDnaId - : null; - } - else if (role == "BROTHER") - { - nodeIdStr = node == 4 ? profileAdmin?.Child3DnaId - : node == 3 ? profileAdmin?.Child2DnaId - : node == 2 ? profileAdmin?.Child1DnaId - : (node == 1 || node == 0) ? profileAdmin?.RootDnaId - : null; - } - else if (role == "ROOT") - { - nodeIdStr = profileAdmin?.RootDnaId; - } - Guid? nodeId = Guid.TryParse(nodeIdStr, out var ng) ? ng : (Guid?)null; - var page = req.page <= 0 ? 1 : req.page; var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; var data_search = (from x in _context.DisciplineDisciplinarys - where - ( - x.Title.Contains(keyword) || - x.DisciplinaryFaultLevel.Contains(keyword) || - x.DisciplinaryCaseFault.Contains(keyword) - ) - && - ( - role == "OWNER" ? true : - role == "ROOT" ? x.RootDnaId == nodeId : - role == "CHILD" ? ( - node == 4 ? x.Child4DnaId == nodeId : - node == 3 ? x.Child3DnaId == nodeId : - node == 2 ? x.Child2DnaId == nodeId : - node == 1 ? x.Child1DnaId == nodeId : - node == 0 ? x.RootDnaId == nodeId : - true - ) : - role == "BROTHER" ? ( - node == 4 ? x.Child3DnaId == nodeId : - node == 3 ? x.Child2DnaId == nodeId : - node == 2 ? x.Child1DnaId == nodeId : - (node == 1 || node == 0) ? x.RootDnaId == nodeId : - true - ) : - role == "NORMAL" ? ( - node == 0 ? x.RootDnaId == nodeId && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == nodeId && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == nodeId && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == nodeId && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == nodeId : - true - ) : - true - ) + where x.Title.Contains(keyword) || + x.DisciplinaryFaultLevel.Contains(keyword) || + x.DisciplinaryCaseFault.Contains(keyword) select x).ToList(); if (status.Trim().ToUpper() != "ALL") data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs index 2bdbc8ea..4bd7918e 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs @@ -32,15 +32,13 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers private readonly NotificationRepository _repositoryNoti; private readonly PermissionRepository _permission; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; public DisciplineInvestigateController(DisciplineDbContext context, MinIODisciplineService documentService, NotificationRepository repositoryNoti, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - PermissionRepository permission, - UserProfileRepository userProfileRepository) + PermissionRepository permission) { // _repository = repository; _context = context; @@ -49,7 +47,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers _repositoryNoti = repositoryNoti; _permission = permission; _configuration = configuration; - _userProfileRepository = userProfileRepository; } #region " Properties " @@ -120,35 +117,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - - // กรองสิทธิ์ - string role = jsonData["result"]?.ToString() ?? ""; - var profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), token.Replace("Bearer ", "")); - var node = profileAdmin?.Node; - string? nodeIdStr = null; - if (role == "NORMAL" || role == "CHILD") - { - nodeIdStr = node == 4 ? profileAdmin?.Child4DnaId - : node == 3 ? profileAdmin?.Child3DnaId - : node == 2 ? profileAdmin?.Child2DnaId - : node == 1 ? profileAdmin?.Child1DnaId - : node == 0 ? profileAdmin?.RootDnaId - : null; - } - else if (role == "BROTHER") - { - nodeIdStr = node == 4 ? profileAdmin?.Child3DnaId - : node == 3 ? profileAdmin?.Child2DnaId - : node == 2 ? profileAdmin?.Child1DnaId - : (node == 1 || node == 0) ? profileAdmin?.RootDnaId - : null; - } - else if (role == "ROOT") - { - nodeIdStr = profileAdmin?.RootDnaId; - } - Guid? nodeId = Guid.TryParse(nodeIdStr, out var ng) ? ng : (Guid?)null; - var page = req.page <= 0 ? 1 : req.page; var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; @@ -156,35 +124,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers var data_search = (from x in _context.DisciplineInvestigates where x.Title.Contains(keyword) - && - ( - role == "OWNER" ? true : - role == "ROOT" ? x.RootDnaId == nodeId : - role == "CHILD" ? ( - node == 4 ? x.Child4DnaId == nodeId : - node == 3 ? x.Child3DnaId == nodeId : - node == 2 ? x.Child2DnaId == nodeId : - node == 1 ? x.Child1DnaId == nodeId : - node == 0 ? x.RootDnaId == nodeId : - true - ) : - role == "BROTHER" ? ( - node == 4 ? x.Child3DnaId == nodeId : - node == 3 ? x.Child2DnaId == nodeId : - node == 2 ? x.Child1DnaId == nodeId : - (node == 1 || node == 0) ? x.RootDnaId == nodeId : - true - ) : - role == "NORMAL" ? ( - node == 0 ? x.RootDnaId == nodeId && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == nodeId && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == nodeId && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == nodeId && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == nodeId : - true - ) : - true - ) select x).ToList(); if (status.Trim().ToUpper() != "ALL") data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); @@ -889,10 +828,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers RespondentType = data.RespondentType.Trim().ToUpper(), Organization = data.Organization, RootDnaId = data.RootDnaId, - Child1DnaId = data.Child1DnaId, - Child2DnaId = data.Child2DnaId, - Child3DnaId = data.Child3DnaId, - Child4DnaId = data.Child4DnaId, ConsideredAgency = data.ConsideredAgency, OrganizationId = data.OrganizationId, ConsideredAgencyId = data.ConsideredAgencyId, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index b00f32be..f6697c2e 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -34,14 +34,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; public DisciplineResultController(DisciplineDbContext context, MinIODisciplineService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - PermissionRepository permission, - UserProfileRepository userProfileRepository) + PermissionRepository permission) { // _repository = repository; _context = context; @@ -49,7 +47,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers _httpContextAccessor = httpContextAccessor; _configuration = configuration; _permission = permission; - _userProfileRepository = userProfileRepository; } #region " Properties " @@ -141,34 +138,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - // กรองสิทธิ์ - string role = jsonData["result"]?.ToString() ?? ""; - var profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), token.Replace("Bearer ", "")); - var node = profileAdmin?.Node; - string? nodeIdStr = null; - if (role == "NORMAL" || role == "CHILD") - { - nodeIdStr = node == 4 ? profileAdmin?.Child4DnaId - : node == 3 ? profileAdmin?.Child3DnaId - : node == 2 ? profileAdmin?.Child2DnaId - : node == 1 ? profileAdmin?.Child1DnaId - : node == 0 ? profileAdmin?.RootDnaId - : null; - } - else if (role == "BROTHER") - { - nodeIdStr = node == 4 ? profileAdmin?.Child3DnaId - : node == 3 ? profileAdmin?.Child2DnaId - : node == 2 ? profileAdmin?.Child1DnaId - : (node == 1 || node == 0) ? profileAdmin?.RootDnaId - : null; - } - else if (role == "ROOT") - { - nodeIdStr = profileAdmin?.RootDnaId; - } - Guid? nodeId = Guid.TryParse(nodeIdStr, out var ng) ? ng : (Guid?)null; - var page = req.page <= 0 ? 1 : req.page; var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; @@ -181,34 +150,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers (x.ResultTitleType == null ? false : x.ResultTitleType.Contains(keyword)) || (x.ResultYear == null ? false : (x.ResultYear + 543).ToString().Contains(keyword))) .Where(x => x.Status.Contains("DONE") || x.Status.Contains("REPORT")) - .Where(x => - role == "OWNER" ? true : - role == "ROOT" ? x.RootDnaId == nodeId : - role == "CHILD" ? ( - node == 4 ? x.Child4DnaId == nodeId : - node == 3 ? x.Child3DnaId == nodeId : - node == 2 ? x.Child2DnaId == nodeId : - node == 1 ? x.Child1DnaId == nodeId : - node == 0 ? x.RootDnaId == nodeId : - true - ) : - role == "BROTHER" ? ( - node == 4 ? x.Child3DnaId == nodeId : - node == 3 ? x.Child2DnaId == nodeId : - node == 2 ? x.Child1DnaId == nodeId : - (node == 1 || node == 0) ? x.RootDnaId == nodeId : - true - ) : - role == "NORMAL" ? ( - node == 0 ? x.RootDnaId == nodeId && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == nodeId && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == nodeId && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == nodeId && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == nodeId : - true - ) : - true - ) .ToListAsync(); if (status.Trim().ToUpper() != "ALL") data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); diff --git a/BMA.EHR.Discipline.Service/Program.cs b/BMA.EHR.Discipline.Service/Program.cs index b1f821ed..5a1f99c4 100644 --- a/BMA.EHR.Discipline.Service/Program.cs +++ b/BMA.EHR.Discipline.Service/Program.cs @@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args); DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire_Discipline" + TablesPrefix = "Hangfire" }))); builder.Services.AddHangfireServer(); } diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs index 12876a60..e67c2c7b 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs @@ -61,14 +61,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("RootDnaId")] public Guid? RootDnaId { get; set; } - [Comment("Child1DnaId")] - public Guid? Child1DnaId { get; set; } - [Comment("Child2DnaId")] - public Guid? Child2DnaId { get; set; } - [Comment("Child3DnaId")] - public Guid? Child3DnaId { get; set; } - [Comment("Child4DnaId")] - public Guid? Child4DnaId { get; set; } public virtual List DisciplineComplaint_Profiles { get; set; } = new List(); public virtual List DisciplineComplaint_Docs { get; set; } = new List(); public virtual List DisciplineInvestigates { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs index f47b834e..ff0a5ca5 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs @@ -148,14 +148,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("RootDnaId")] public Guid? RootDnaId { get; set; } - [Comment("Child1DnaId")] - public Guid? Child1DnaId { get; set; } - [Comment("Child2DnaId")] - public Guid? Child2DnaId { get; set; } - [Comment("Child3DnaId")] - public Guid? Child3DnaId { get; set; } - [Comment("Child4DnaId")] - public Guid? Child4DnaId { get; set; } public DisciplineInvestigate DisciplineInvestigate { get; set; } public virtual List DisciplineDisciplinary_ProfileComplaintInvestigates { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs index 50dd3861..de50574e 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs @@ -92,14 +92,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("RootDnaId")] public Guid? RootDnaId { get; set; } - [Comment("Child1DnaId")] - public Guid? Child1DnaId { get; set; } - [Comment("Child2DnaId")] - public Guid? Child2DnaId { get; set; } - [Comment("Child3DnaId")] - public Guid? Child3DnaId { get; set; } - [Comment("Child4DnaId")] - public Guid? Child4DnaId { get; set; } public DisciplineComplaint DisciplineComplaint { get; set; } public virtual List DisciplineInvestigate_ProfileComplaints { get; set; } = new List(); public virtual List DisciplineInvestigate_DocComplaints { get; set; } = new List(); diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.Designer.cs deleted file mode 100644 index 1d707638..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.Designer.cs +++ /dev/null @@ -1,3723 +0,0 @@ -// -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("20260717041310_AddChildDnaIdsToDiscipline")] - partial class AddChildDnaIdsToDiscipline - { - /// - 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") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง 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("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .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") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - 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("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .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.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - 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("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .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("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - 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") - .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") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - 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") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง 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("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .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("DisciplinaryFaultLevelOther") - .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") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .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("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - 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("CommandNo") - .HasColumnType("longtext") - .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("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .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.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_DocResult", 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_DocResults"); - }); - - 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("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_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", 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_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", 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("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .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("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .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("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("text") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง 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("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .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") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .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("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", 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("DisciplineInvestigateId") - .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("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_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("DisciplineInvestigateId") - .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("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .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("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .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.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_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("DisciplineInvestigateId") - .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("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", 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("DisciplineInvestigateId") - .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("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", 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("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .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("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_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("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .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("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - 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("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", 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("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("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - 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.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - 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_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.cs deleted file mode 100644 index 76f83973..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class AddChildDnaIdsToDiscipline : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "DisciplineInvestigates", - type: "char(36)", - nullable: true, - comment: "Child1DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "DisciplineInvestigates", - type: "char(36)", - nullable: true, - comment: "Child2DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "DisciplineInvestigates", - type: "char(36)", - nullable: true, - comment: "Child3DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "DisciplineInvestigates", - type: "char(36)", - nullable: true, - comment: "Child4DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "DisciplineDisciplinarys", - type: "char(36)", - nullable: true, - comment: "Child1DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "DisciplineDisciplinarys", - type: "char(36)", - nullable: true, - comment: "Child2DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "DisciplineDisciplinarys", - type: "char(36)", - nullable: true, - comment: "Child3DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "DisciplineDisciplinarys", - type: "char(36)", - nullable: true, - comment: "Child4DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "DisciplineComplaints", - type: "char(36)", - nullable: true, - comment: "Child1DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "DisciplineComplaints", - type: "char(36)", - nullable: true, - comment: "Child2DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "DisciplineComplaints", - type: "char(36)", - nullable: true, - comment: "Child3DnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "DisciplineComplaints", - type: "char(36)", - nullable: true, - comment: "Child4DnaId", - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "DisciplineInvestigates"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "DisciplineInvestigates"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "DisciplineInvestigates"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "DisciplineInvestigates"); - - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "DisciplineDisciplinarys"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "DisciplineDisciplinarys"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "DisciplineDisciplinarys"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "DisciplineDisciplinarys"); - - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "DisciplineComplaints"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "DisciplineComplaints"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "DisciplineComplaints"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "DisciplineComplaints"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs index a34dd020..21889f3c 100644 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs @@ -32,22 +32,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("ผู้ร้องเรียน"); - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - b.Property("ComplaintFrom") .HasColumnType("longtext") .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); @@ -880,22 +864,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("ผู้ร้องเรียน"); - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - b.Property("ComplaintFrom") .HasColumnType("longtext") .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); @@ -2119,22 +2087,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("ผู้ร้องเรียน"); - b.Property("Child1DnaId") - .HasColumnType("char(36)") - .HasComment("Child1DnaId"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)") - .HasComment("Child2DnaId"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)") - .HasComment("Child3DnaId"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)") - .HasComment("Child4DnaId"); - b.Property("ComplaintFrom") .HasColumnType("longtext") .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index cfef0c83..1480affd 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -30,7 +30,6 @@ using RabbitMQ.Client.Events; using Swashbuckle.AspNetCore.Annotations; using System.ComponentModel.DataAnnotations; using System.Diagnostics; -using System.Reflection.Metadata.Ecma335; using System.Security.Claims; using System.Text; using System.Threading.Tasks; @@ -780,16 +779,6 @@ namespace BMA.EHR.Leave.Service.Controllers { try { - // var get current status - var task = await _checkInJobStatusRepository.GetByTaskIdAsync(job.TaskId); - - // return if stask status != "PENDING" - if (task is not null) - { - if (task.Status != "PENDING") - continue; - } - // อ่านข้อมูลเดิมจาก AdditionalData if (string.IsNullOrEmpty(job.AdditionalData)) { @@ -1086,9 +1075,6 @@ namespace BMA.EHR.Leave.Service.Controllers try { - - - // อัปเดตสถานะเป็น PROCESSING if (taskId != Guid.Empty) { diff --git a/BMA.EHR.Leave/Services/NotificationService.cs b/BMA.EHR.Leave/Services/NotificationService.cs index 7ea4837c..3ada008e 100644 --- a/BMA.EHR.Leave/Services/NotificationService.cs +++ b/BMA.EHR.Leave/Services/NotificationService.cs @@ -11,22 +11,15 @@ public class NotificationService private readonly ILogger _logger; private readonly IConfiguration _configuration; - private string _notifyEndpoint; + private const string NotifyEndpoint = "https://hrmsbkk.case-collection.com/api/v1/org/through-socket/notify-from-token"; public NotificationService(IHttpClientFactory httpClientFactory, ILogger logger, IConfiguration configuration) { _httpClientFactory = httpClientFactory; _logger = logger; _configuration = configuration; - _notifyEndpoint = $"{_configuration["API"]}/org/through-socket/notify-from-token"; } - /// - /// SendNotificationAsync - /// - /// - /// - /// public async Task SendNotificationAsync(string? token, bool error, string message) { if (string.IsNullOrEmpty(token)) @@ -49,7 +42,7 @@ public class NotificationService var json = JsonConvert.SerializeObject(payload); var content = new StringContent(json, Encoding.UTF8, "application/json"); - var response = await client.PostAsync(_notifyEndpoint, content); + var response = await client.PostAsync(NotifyEndpoint, content); if (!response.IsSuccessStatusCode) { diff --git a/BMA.EHR.Placement.Service/Program.cs b/BMA.EHR.Placement.Service/Program.cs index 5db2aa84..897d16ca 100644 --- a/BMA.EHR.Placement.Service/Program.cs +++ b/BMA.EHR.Placement.Service/Program.cs @@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args); PrepareSchemaIfNecessary = true, DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), - TablesPrefix = "Hangfire_Placement" + TablesPrefix = "Hangfire" }))); builder.Services.AddHangfireServer(); } diff --git a/BMA.EHR.Retirement.Service/Program.cs b/BMA.EHR.Retirement.Service/Program.cs index 6f7a6352..a55f9674 100644 --- a/BMA.EHR.Retirement.Service/Program.cs +++ b/BMA.EHR.Retirement.Service/Program.cs @@ -130,7 +130,7 @@ var builder = WebApplication.CreateBuilder(args); DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire_Retirement" + TablesPrefix = "Hangfire" }))); builder.Services.AddHealthChecks(); }