From db712d586ae6b79e8a63cb3a41d1e7bbede62607 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 3 May 2024 17:39:10 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=82=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=87=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=9E=E0=B9=89=E0=B8=99=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release_Retirement.yaml | 2 +- .../Commands/CommandRepository.cs | 18 +- .../Models/Placement/PlacementAppointment.cs | 69 +- .../Models/Placement/PlacementOfficer.cs | 6 +- .../Models/Placement/PlacementReceive.cs | 85 +- .../Models/Placement/PlacementRepatriation.cs | 4 + .../Retirement/RetirementDeceasedNoti.cs | 4 +- .../Models/Retirement/RetirementOther.cs | 4 + .../Models/Retirement/RetirementOut.cs | 4 + ... PlacementRecive add profileid.Designer.cs | 17550 +++++++++++++++ ...ate table PlacementRecive add profileid.cs | 28 + ...PlacementRecive add profileid1.Designer.cs | 17682 ++++++++++++++++ ...te table PlacementRecive add profileid1.cs | 449 + ...PlacementRecive add profileid2.Designer.cs | 17682 ++++++++++++++++ ...te table PlacementRecive add profileid2.cs | 22 + ...ementRecive remove ReceiveUser.Designer.cs | 17669 +++++++++++++++ ...able PlacementRecive remove ReceiveUser.cs | 52 + ...lacementRecive add dateOfBirth.Designer.cs | 17674 +++++++++++++++ ...e table PlacementRecive add dateOfBirth.cs | 31 + ...lacementRecive add typeCommand.Designer.cs | 17664 +++++++++++++++ ...e table PlacementRecive add typeCommand.cs | 62 + ...PlacementRecive add reportdate.Designer.cs | 17668 +++++++++++++++ ...te table PlacementRecive add reportdate.cs | 30 + .../ApplicationDBContextModelSnapshot.cs | 186 +- .../PlacementAppointmentController.cs | 221 +- .../PlacementAppointmentEmployeeController.cs | 220 +- .../Controllers/PlacementOfficerController.cs | 14 + .../Controllers/PlacementReceiveController.cs | 299 +- .../PlacementRepatriationController.cs | 12 + .../Requests/OrgRequest.cs | 4 + ...electPositionAppointmentEmployeeRequest.cs | 2 +- .../PersonSelectPositionAppointmentRequest.cs | 2 +- .../PersonSelectPositionReceiveRequest.cs | 2 +- .../PlacementAppointmentEditRequest.cs | 24 +- .../Requests/PlacementOfficerEditRequest.cs | 1 + .../RetirementDeceasedController.cs | 68 +- .../Controllers/RetirementOtherController.cs | 13 + .../Controllers/RetirementOutController.cs | 13 + BMA.EHR.Retirement.Service/Program.cs | 6 +- .../Requests/OrgRequest.cs | 3 + BMA.EHR.Retirement.Service/appsettings.json | 4 +- 41 files changed, 125142 insertions(+), 411 deletions(-) create mode 100644 BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.Designer.cs create mode 100644 BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.cs diff --git a/.github/workflows/release_Retirement.yaml b/.github/workflows/release_Retirement.yaml index 8c0cd098..b11c9b3c 100644 --- a/.github/workflows/release_Retirement.yaml +++ b/.github/workflows/release_Retirement.yaml @@ -17,7 +17,7 @@ env: TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # act workflow_dispatch -W .github/workflows/release_retirement.yaml --input IMAGE_VER=retirement-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd + # act workflow_dispatch -W .github/workflows/release_retirement.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 release-dev: runs-on: ubuntu-latest steps: diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 578b2ee4..9d554060 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -490,14 +490,14 @@ namespace BMA.EHR.Application.Repositories.Commands // 2. Query var appointPeople = await _dbContext.Set() - .Include(x => x.CommandType) + //.Include(x => x.CommandType) //.Include(x => x.Prefix) //.Include(x => x.OrganizationPosition) //.ThenInclude(x => x!.Organization) //.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId) .Where(x => !otherCommandReceivers.Contains(x.citizenId)) .Where(x => x.Status.Trim().ToUpper() == "REPORT") - .Where(x => x.CommandType!.Id == command.CommandType!.Id) + //.Where(x => x.CommandType!.Id == command.CommandType!.Id) .OrderBy(x => x.citizenId) .ToListAsync(); @@ -551,15 +551,15 @@ namespace BMA.EHR.Application.Repositories.Commands // 2. Query var appointPeople = await _dbContext.Set() - .Include(x => x.CommandType) + //.Include(x => x.CommandType) //.Include(x => x.Prefix) //.Include(x => x.OrganizationPosition) //.ThenInclude(x => x!.Organization) //.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId) .Where(x => !otherCommandReceivers.Contains(x.citizenId)) .Where(x => x.Status.Trim().ToUpper() == "REPORT") - .Where(x => x.CommandType!.Id == command.CommandType!.Id) - .OrderBy(x => x.citizenId) + //.Where(x => x.CommandType!.Id == command.CommandType!.Id) + //.OrderBy(x => x.citizenId) .ToListAsync(); // 3. Create new Record @@ -612,14 +612,14 @@ namespace BMA.EHR.Application.Repositories.Commands // 2. Query var appointPeople = await _dbContext.Set() - .Include(x => x.CommandType) + //.Include(x => x.CommandType) //.Include(x => x.Prefix) //.Include(x => x.OrganizationPosition) //.ThenInclude(x => x!.Organization) //.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId) .Where(x => !otherCommandReceivers.Contains(x.citizenId)) .Where(x => x.Status.Trim().ToUpper() == "REPORT") - .Where(x => x.CommandType!.Id == command.CommandType!.Id) + //.Where(x => x.CommandType!.Id == command.CommandType!.Id) .OrderBy(x => x.citizenId) .ToListAsync(); @@ -1630,7 +1630,7 @@ namespace BMA.EHR.Application.Repositories.Commands // 2. Query var appointPeople = await _dbContext.Set() - .Include(x => x.CommandType) + //.Include(x => x.CommandType) //.Include(x => x.Prefix) //.Include(x => x.OrganizationPosition) //.ThenInclude(x => x!.Organization) @@ -10891,7 +10891,7 @@ namespace BMA.EHR.Application.Repositories.Commands select new { r.RefPlacementProfileId, - Position = pf.positionName + Position = pf.position }).ToListAsync(); if (data.Count > 0) diff --git a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs index d85c4685..0980c637 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs @@ -11,56 +11,12 @@ namespace BMA.EHR.Domain.Models.Placement { public class PlacementAppointment : EntityBase { - // [Required, Comment("Id User")] - // public Profile Profile { get; set; } - // [Required, MaxLength(20), Comment("เลขประจำตัวประชาชน")] - // public string? CitizenId { get; set; } - // [Required, Comment("คำนำหน้า")] - // public Prefix? Prefix { get; set; } - // [Required, Comment("ชื่อ")] - // public string? Firstname { get; set; } - // [Required, Comment("นามสกุล")] - // public string? Lastname { get; set; } - // [MaxLength(40), Comment("วันเกิด")] - // public DateTime DateOfBirth { get; set; } - // [Comment("Id เพศ")] - // public Gender? Gender { get; set; } - // [MaxLength(100), Comment("สัญชาติ")] - // public string? Nationality { get; set; } - // [MaxLength(100), Comment("เชื้อชาติ")] - // public string? Race { get; set; } - // [Comment("Id ศาสนา")] - // public Religion? Religion { get; set; } - // [Comment("Id กลุ่มเลือด")] - // public BloodGroup? BloodGroup { get; set; } - // [Comment("Id สถานะภาพ")] - // public Relationship? Relationship { get; set; } - // [MaxLength(50), Comment("เบอร์โทร")] - // public string? TelephoneNumber { get; set; } [Comment("สถานะคำขอ")] public string Status { get; set; } = "WAITTING"; - // [Comment("Id เลขที่ตำแหน่ง")] - // public OrganizationPositionEntity? OrganizationPosition { get; set; } [Comment("วันที่บรรจุ")] public DateTime? RecruitDate { get; set; } - - // [Comment("Id ตำแหน่งเลขที่")] - // public PositionNumberEntity? PositionNumber { get; set; } - - // [Comment("Id ตำแหน่ง")] - // public PositionPath? PositionPath { get; set; } - - // [Comment("Id ด้าน/สาขา")] - // public PositionPathSide? PositionPathSide { get; set; } - - // [Comment("Id ประเภทตำแหน่ง")] - // public PositionType? PositionType { get; set; } - - // [Comment("Id สายงาน")] - // public PositionLine? PositionLine { get; set; } - - // [Comment("Id ระดับ")] - // public PositionLevel? PositionLevel { get; set; } + [Comment("วันที่รายงานตัว")] + public DateTime? ReportingDate { get; set; } [Comment("ประเภทราชการ")] public string? type { get; set; } [Comment("เงินเดือน")] @@ -69,8 +25,12 @@ namespace BMA.EHR.Domain.Models.Placement public string? Reason { get; set; } [Comment("วุฒิ/สาขาเดิม")] public string? EducationOld { get; set; } - [Comment("สังกัดเดิม")] + [Comment("สังกัด/ตำแหน่งเเดิม")] public string? OrganizationPositionOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")] public string? PositionTypeOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ระดับ")] @@ -81,12 +41,14 @@ namespace BMA.EHR.Domain.Models.Placement public double? AmountOld { get; set; } [Comment("สถานะการใช้งาน")] public bool IsActive { get; set; } = true; - [Comment("ประเภทคำสั่ง")] - public CommandType? CommandType { get; set; } + // [Comment("ประเภทคำสั่ง")] + // public CommandType? CommandType { get; set; } [Comment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ")] public DateTime? PositionDate { get; set; } + + [Comment("profile Id")] public string? profileId { get; set; } [Comment("คำนำหน้า")] @@ -97,6 +59,8 @@ namespace BMA.EHR.Domain.Models.Placement public string? lastName { get; set; } [Comment("เลขบัตรประชาชน")] public string? citizenId { get; set; } + [MaxLength(40), Comment("วันเกิด")] + public DateTime? DateOfBirth { get; set; } [Comment("ชื่อหน่วยงาน root")] public string? root { get; set; } [Comment("id หน่วยงาน root")] @@ -129,7 +93,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? child4ShortName { get; set; } [Comment("ระดับโครงสร้าง")] public int? node { get; set; } - [Comment("id โครงสร้าง")] public Guid? nodeId { get; set; } [Comment("id อัตรากำลัง")] @@ -143,7 +106,7 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("เลขที่ตำแหน่ง")] public int? posMasterNo { get; set; } [Comment("ชื่อตำแหน่งในสายงาน")] - public string? positionName { get; set; } + public string? position { get; set; } [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] @@ -187,8 +150,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? child4OldId { get; set; } [Comment("ชื่อย่อหน่วยงาน child4 old")] public string? child4ShortNameOld { get; set; } - // [Comment("id revision old")] - // public string? orgRevisionId { get; set; } [Comment("เลขที่ตำแหน่ง old")] public int? posMasterNoOld { get; set; } [Comment("ชื่อตำแหน่งในสายงาน old")] @@ -201,6 +162,8 @@ namespace BMA.EHR.Domain.Models.Placement public string? posLevelOldId { get; set; } [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } + [Comment("ประเภทคำสั่ง")] + public string? typeCommand { get; set; } // public OrgEmployee? OrgEmployee { get; set; } // public PositionEmployeeStatus? PositionEmployeeStatus { get; set; } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs index 714be535..402d1198 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs @@ -19,10 +19,12 @@ namespace BMA.EHR.Domain.Models.Placement public string? PositionLevelOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม เลขที่")] public string? PositionNumberOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม เงินเดือน")] public double? AmountOld { get; set; } - - [Comment("สังกัด")] public string? OrganizationPositionOld { get; set; } [Comment("หน่วยงานที่ช่วยราชการไป")] diff --git a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs index 66defe8f..ad4fc75e 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs @@ -10,18 +10,8 @@ namespace BMA.EHR.Domain.Models.Placement { public class PlacementReceive : EntityBase { - // [Required, Comment("Id User")] - // public Profile Profile { get; set; } [Comment("Fk Table Document")] public Document? Avatar { get; set; } - // [Required, MaxLength(20), Comment("เลขประจำตัวประชาชน")] - // public string CitizenId { get; set; } - // [Required, Comment("คำนำหน้า")] - // public Prefix Prefix { get; set; } - // [Required, Comment("ชื่อ")] - // public string Firstname { get; set; } - // [Required, Comment("นามสกุล")] - // public string Lastname { get; set; } [MaxLength(40), Comment("วันเกิด")] public DateTime DateOfBirth { get; set; } [Comment("Id เพศ")] @@ -40,36 +30,23 @@ namespace BMA.EHR.Domain.Models.Placement public string? TelephoneNumber { get; set; } [Comment("สถานะคำขอ")] public string Status { get; set; } = "WAITTING"; - // [Comment("Id เลขที่ตำแหน่ง")] - // public OrganizationPositionEntity? OrganizationPosition { get; set; } [Comment("เงินเดือน")] public double? Amount { get; set; } [Comment("วันที่บรรจุ")] public DateTime? RecruitDate { get; set; } - - // [Comment("Id ตำแหน่งเลขที่")] - // public PositionNumberEntity? PositionNumber { get; set; } - - // [Comment("Id ตำแหน่ง")] - // public PositionPath? PositionPath { get; set; } - - // [Comment("Id ด้าน/สาขา")] - // public PositionPathSide? PositionPathSide { get; set; } - - // [Comment("Id ประเภทตำแหน่ง")] - // public PositionType? PositionType { get; set; } - - // [Comment("Id สายงาน")] - // public PositionLine? PositionLine { get; set; } - - // [Comment("Id ระดับ")] - // public PositionLevel? PositionLevel { get; set; } [Comment("เหตุผลที่รับโอนราชการ")] public string? Reason { get; set; } + + + [Comment("วุฒิ/สาขาเดิม")] public string? EducationOld { get; set; } [Comment("สังกัดเดิม")] public string? OrganizationPositionOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")] public string? PositionTypeOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ระดับ")] @@ -80,6 +57,7 @@ namespace BMA.EHR.Domain.Models.Placement public double? AmountOld { get; set; } + [Comment("profile Id")] public string? profileId { get; set; } [Comment("คำนำหน้า")] @@ -122,7 +100,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? child4ShortName { get; set; } [Comment("ระดับโครงสร้าง")] public int? node { get; set; } - [Comment("id โครงสร้าง")] public Guid? nodeId { get; set; } [Comment("id อัตรากำลัง")] @@ -136,7 +113,7 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("เลขที่ตำแหน่ง")] public int? posMasterNo { get; set; } [Comment("ชื่อตำแหน่งในสายงาน")] - public string? positionName { get; set; } + public string? position { get; set; } [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] @@ -147,6 +124,50 @@ namespace BMA.EHR.Domain.Models.Placement public string? posLevelName { get; set; } + + [Comment("ชื่อหน่วยงาน root old")] + public string? rootOld { get; set; } + [Comment("id หน่วยงาน root old")] + public string? rootOldId { get; set; } + [Comment("ชื่อย่อหน่วยงาน root old")] + public string? rootShortNameOld { get; set; } + [Comment("ชื่อหน่วยงาน child1 old")] + public string? child1Old { get; set; } + [Comment("id หน่วยงาน child1 old")] + public string? child1OldId { get; set; } + [Comment("ชื่อย่อหน่วยงาน child1 old")] + public string? child1ShortNameOld { get; set; } + [Comment("ชื่อหน่วยงาน child2 old")] + public string? child2Old { get; set; } + [Comment("id หน่วยงาน child2 old")] + public string? child2OldId { get; set; } + [Comment("ชื่อย่อหน่วยงาน child2 old")] + public string? child2ShortNameOld { get; set; } + [Comment("ชื่อหน่วยงาน child3 old")] + public string? child3Old { get; set; } + [Comment("id หน่วยงาน child3 old")] + public string? child3OldId { get; set; } + [Comment("ชื่อย่อหน่วยงาน child3 old")] + public string? child3ShortNameOld { get; set; } + [Comment("ชื่อหน่วยงาน child4 old")] + public string? child4Old { get; set; } + [Comment("id หน่วยงาน child4 old")] + public string? child4OldId { get; set; } + [Comment("ชื่อย่อหน่วยงาน child4 old")] + public string? child4ShortNameOld { get; set; } + [Comment("เลขที่ตำแหน่ง old")] + public int? posMasterNoOld { get; set; } + [Comment("ชื่อตำแหน่งในสายงาน old")] + public string? positionOld { get; set; } + [Comment("id ประเภทตำแหน่ง old")] + public string? posTypeOldId { get; set; } + [Comment("ชื่อประเภทตำแหน่ง old")] + public string? posTypeNameOld { get; set; } + [Comment("id ระดับตำแหน่ง old")] + public string? posLevelOldId { get; set; } + [Comment("ชื่อระดับตำแหน่ง old")] + public string? posLevelNameOld { get; set; } + [Comment("สถานะการใช้งาน")] public bool IsActive { get; set; } = true; public virtual List PlacementReceiveDocs { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs b/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs index 4004fd34..b0c7dbda 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs @@ -15,6 +15,10 @@ namespace BMA.EHR.Domain.Models.Placement public string? Reason { get; set; } = string.Empty; [Comment("สังกัด")] public string? OrganizationPositionOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ตั้งแต่วันที่")] public DateTime? Date { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")] diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs b/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs index 07c83787..eac3b190 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs @@ -10,8 +10,8 @@ namespace BMA.EHR.Domain.Models.Retirement { public class RetirementDeceasedNoti : EntityBase { - [Comment("รหัสอ้างอิงผู้ใช้งานระบบ")] - public Profile ReceiveUser { get; set; } + // [Comment("รหัสอ้างอิงผู้ใช้งานระบบ")] + // public Profile ReceiveUser { get; set; } [Comment("Fk Table RetirementDeceased")] public RetirementDeceased RetirementDeceased { get; set; } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs index ff5fca80..f61ad469 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs @@ -23,6 +23,10 @@ namespace BMA.EHR.Domain.Models.Retirement public string? EducationOld { get; set; } [Comment("สังกัดเดิม")] public string? OrganizationPositionOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")] public string? PositionTypeOld { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ระดับ")] diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs index c898ecb6..8ef0cb18 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs @@ -15,6 +15,10 @@ namespace BMA.EHR.Domain.Models.Retirement public string? Reason { get; set; } = string.Empty; [Comment("สังกัด")] public string? OrganizationPositionOld { get; set; } + [Comment("สังกัดเดิม")] + public string? OrganizationOld { get; set; } + [Comment("ตำแหน่งเดิม")] + public string? PositionOld { get; set; } [Comment("ตั้งแต่วันที่")] public DateTime? Date { get; set; } [Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")] diff --git a/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.Designer.cs new file mode 100644 index 00000000..af1994ac --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.Designer.cs @@ -0,0 +1,17550 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240502110245_update table PlacementRecive add profileid")] + partial class updatetablePlacementReciveaddprofileid + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ReceiveUserId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "ReceiveUser") + .WithMany() + .HasForeignKey("ReceiveUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("ReceiveUser"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.cs b/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.cs new file mode 100644 index 00000000..58cbbb21 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240502110245_update table PlacementRecive add profileid.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveaddprofileid : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "positionName", + table: "PlacementReceives", + newName: "position"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "position", + table: "PlacementReceives", + newName: "positionName"); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.Designer.cs new file mode 100644 index 00000000..c5d23534 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.Designer.cs @@ -0,0 +1,17682 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240502135321_update table PlacementRecive add profileid1")] + partial class updatetablePlacementReciveaddprofileid1 + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ReceiveUserId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "ReceiveUser") + .WithMany() + .HasForeignKey("ReceiveUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("ReceiveUser"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.cs b/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.cs new file mode 100644 index 00000000..0deee5d4 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240502135321_update table PlacementRecive add profileid1.cs @@ -0,0 +1,449 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveaddprofileid1 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "positionName", + table: "PlacementAppointments", + newName: "position"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "RetirementOuts", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "RetirementOuts", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "RetirementOthers", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "RetirementOthers", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "PlacementRepatriations", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "PlacementRepatriations", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child1Old", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อหน่วยงาน child1 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child1OldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id หน่วยงาน child1 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child1ShortNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อย่อหน่วยงาน child1 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child2Old", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อหน่วยงาน child2 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child2OldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id หน่วยงาน child2 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child2ShortNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อย่อหน่วยงาน child2 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child3Old", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อหน่วยงาน child3 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child3OldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id หน่วยงาน child3 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child3ShortNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อย่อหน่วยงาน child3 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child4Old", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อหน่วยงาน child4 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child4OldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id หน่วยงาน child4 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "child4ShortNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อย่อหน่วยงาน child4 old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "posLevelNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อระดับตำแหน่ง old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "posLevelOldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id ระดับตำแหน่ง old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "posMasterNoOld", + table: "PlacementReceives", + type: "int", + nullable: true, + comment: "เลขที่ตำแหน่ง old"); + + migrationBuilder.AddColumn( + name: "posTypeNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อประเภทตำแหน่ง old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "posTypeOldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id ประเภทตำแหน่ง old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "positionOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อตำแหน่งในสายงาน old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "rootOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อหน่วยงาน root old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "rootOldId", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "id หน่วยงาน root old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "rootShortNameOld", + table: "PlacementReceives", + type: "longtext", + nullable: true, + comment: "ชื่อย่อหน่วยงาน root old") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "PlacementOfficers", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "PlacementOfficers", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "OrganizationPositionOld", + table: "PlacementAppointments", + type: "longtext", + nullable: true, + comment: "สังกัด/ตำแหน่งเเดิม", + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true, + oldComment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "OrganizationOld", + table: "PlacementAppointments", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "PositionOld", + table: "PlacementAppointments", + type: "longtext", + nullable: true, + comment: "ตำแหน่งเดิม") + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "RetirementOuts"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "RetirementOuts"); + + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "RetirementOthers"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "RetirementOthers"); + + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "PlacementRepatriations"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "PlacementRepatriations"); + + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child1Old", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child1OldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child1ShortNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child2Old", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child2OldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child2ShortNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child3Old", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child3OldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child3ShortNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child4Old", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child4OldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "child4ShortNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "posLevelNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "posLevelOldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "posMasterNoOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "posTypeNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "posTypeOldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "positionOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "rootOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "rootOldId", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "rootShortNameOld", + table: "PlacementReceives"); + + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "PlacementOfficers"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "PlacementOfficers"); + + migrationBuilder.DropColumn( + name: "OrganizationOld", + table: "PlacementAppointments"); + + migrationBuilder.DropColumn( + name: "PositionOld", + table: "PlacementAppointments"); + + migrationBuilder.RenameColumn( + name: "position", + table: "PlacementAppointments", + newName: "positionName"); + + migrationBuilder.AlterColumn( + name: "OrganizationPositionOld", + table: "PlacementAppointments", + type: "longtext", + nullable: true, + comment: "สังกัดเดิม", + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true, + oldComment: "สังกัด/ตำแหน่งเเดิม") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.Designer.cs new file mode 100644 index 00000000..3353bced --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.Designer.cs @@ -0,0 +1,17682 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240503020659_update table PlacementRecive add profileid2")] + partial class updatetablePlacementReciveaddprofileid2 + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ReceiveUserId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "ReceiveUser") + .WithMany() + .HasForeignKey("ReceiveUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("ReceiveUser"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.cs b/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.cs new file mode 100644 index 00000000..62ee48af --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503020659_update table PlacementRecive add profileid2.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveaddprofileid2 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.Designer.cs new file mode 100644 index 00000000..b1e5909b --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.Designer.cs @@ -0,0 +1,17669 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240503032550_update table PlacementRecive remove ReceiveUser")] + partial class updatetablePlacementReciveremoveReceiveUser + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.cs b/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.cs new file mode 100644 index 00000000..8ac489e3 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503032550_update table PlacementRecive remove ReceiveUser.cs @@ -0,0 +1,52 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveremoveReceiveUser : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_RetirementDeceasedNotis_Profiles_ReceiveUserId", + table: "RetirementDeceasedNotis"); + + migrationBuilder.DropIndex( + name: "IX_RetirementDeceasedNotis_ReceiveUserId", + table: "RetirementDeceasedNotis"); + + migrationBuilder.DropColumn( + name: "ReceiveUserId", + table: "RetirementDeceasedNotis"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ReceiveUserId", + table: "RetirementDeceasedNotis", + type: "char(36)", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), + collation: "ascii_general_ci"); + + migrationBuilder.CreateIndex( + name: "IX_RetirementDeceasedNotis_ReceiveUserId", + table: "RetirementDeceasedNotis", + column: "ReceiveUserId"); + + migrationBuilder.AddForeignKey( + name: "FK_RetirementDeceasedNotis_Profiles_ReceiveUserId", + table: "RetirementDeceasedNotis", + column: "ReceiveUserId", + principalTable: "Profiles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.Designer.cs new file mode 100644 index 00000000..e10a2c06 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.Designer.cs @@ -0,0 +1,17674 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240503033648_update table PlacementRecive add dateOfBirth")] + partial class updatetablePlacementReciveadddateOfBirth + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.cs b/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.cs new file mode 100644 index 00000000..0fc62a6f --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503033648_update table PlacementRecive add dateOfBirth.cs @@ -0,0 +1,31 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveadddateOfBirth : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DateOfBirth", + table: "PlacementAppointments", + type: "datetime(6)", + maxLength: 40, + nullable: true, + comment: "วันเกิด"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DateOfBirth", + table: "PlacementAppointments"); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.Designer.cs new file mode 100644 index 00000000..96d9b858 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.Designer.cs @@ -0,0 +1,17664 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240503044201_update table PlacementRecive add typeCommand")] + partial class updatetablePlacementReciveaddtypeCommand + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.cs b/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.cs new file mode 100644 index 00000000..e7e5ffdb --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503044201_update table PlacementRecive add typeCommand.cs @@ -0,0 +1,62 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveaddtypeCommand : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_PlacementAppointments_CommandTypes_CommandTypeId", + table: "PlacementAppointments"); + + migrationBuilder.DropIndex( + name: "IX_PlacementAppointments_CommandTypeId", + table: "PlacementAppointments"); + + migrationBuilder.DropColumn( + name: "CommandTypeId", + table: "PlacementAppointments"); + + migrationBuilder.AddColumn( + name: "typeCommand", + table: "PlacementAppointments", + type: "longtext", + nullable: true, + comment: "ประเภทคำสั่ง") + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "typeCommand", + table: "PlacementAppointments"); + + migrationBuilder.AddColumn( + name: "CommandTypeId", + table: "PlacementAppointments", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.CreateIndex( + name: "IX_PlacementAppointments_CommandTypeId", + table: "PlacementAppointments", + column: "CommandTypeId"); + + migrationBuilder.AddForeignKey( + name: "FK_PlacementAppointments_CommandTypes_CommandTypeId", + table: "PlacementAppointments", + column: "CommandTypeId", + principalTable: "CommandTypes", + principalColumn: "Id"); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.Designer.cs new file mode 100644 index 00000000..83b75f90 --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.Designer.cs @@ -0,0 +1,17668 @@ +// +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 +{ + [DbContext(typeof(ApplicationDBContext))] + [Migration("20240503061857_update table PlacementRecive add reportdate")] + partial class updatetablePlacementReciveaddreportdate + { + /// + 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.Commands.Core.Command", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthorizedPosition") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserFullName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อผู้มีอำนาจลงนาม"); + + b.Property("AuthorizedUserId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); + + b.Property("CaseFault") + .HasColumnType("longtext") + .HasComment("กรณีความผิด"); + + b.Property("ChairManFullName") + .HasColumnType("longtext") + .HasComment("ประธานคณะกรรมการ"); + + b.Property("CommandAffectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่คำสั่งมีผล"); + + b.Property("CommandExcecuteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกคำสั่ง"); + + b.Property("CommandNo") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandStatusId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); + + b.Property("CommandSubject") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("คำสั่งเรื่อง"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); + + b.Property("CommandYear") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีที่ออกคำสั่ง"); + + b.Property("ComplaintId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องร้องเรียน"); + + b.Property("ConclusionFireDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireNo") + .HasColumnType("longtext") + .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionFireResolution") + .HasColumnType("longtext") + .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); + + b.Property("ConclusionMeetingDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionMeetingNo") + .HasColumnType("longtext") + .HasComment("การประชุม ครั้งที่"); + + b.Property("ConclusionReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (การรับโอน)"); + + b.Property("ConclusionReceiveNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); + + b.Property("ConclusionRegisterDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionRegisterNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); + + b.Property("ConclusionResultDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionResultNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); + + b.Property("ConclusionReturnDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionReturnNo") + .HasColumnType("longtext") + .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); + + b.Property("ConclusionTranferDate") + .HasColumnType("datetime(6)") + .HasComment("การประชุม ลงวันที่"); + + b.Property("ConclusionTranferNo") + .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("Fault") + .HasColumnType("longtext") + .HasComment("รายละเอียดการกระทำผิด"); + + b.Property("FaultLevel") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("GovAidCommandDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); + + b.Property("GovAidCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); + + b.Property("GuiltyBasis") + .HasColumnType("longtext") + .HasComment("ฐานความผิด"); + + b.Property("IssuerOrganizationId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); + + b.Property("IssuerOrganizationName") + .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("Member1FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 1"); + + b.Property("Member2FullName") + .HasColumnType("longtext") + .HasComment("กรรมการคนที่ 2"); + + b.Property("MilitaryCommanDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("MilitaryCommandNo") + .HasColumnType("longtext") + .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); + + b.Property("OwnerGovId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); + + b.Property("PlacementCommandDate") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งบรรจุลงวันที่"); + + b.Property("PlacementCommandIssuer") + .HasColumnType("longtext") + .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); + + b.Property("PlacementCommandNo") + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่งบรรจุ"); + + b.Property("PlacementId") + .HasColumnType("char(36)") + .HasComment("อ้างอิงรอบการสอบ"); + + b.Property("PlacementOrganizationName") + .HasColumnType("longtext") + .HasComment("สังกัดที่บรรจุ"); + + b.Property("PlacementPositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ตำแหน่งที่บรรจุ"); + + b.Property("ProbationEndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); + + b.Property("ProbationStartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); + + b.Property("ReceiveOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่รับโอน"); + + b.Property("RefRaw") + .HasColumnType("longtext") + .HasComment("อ้างอิงมาตราตามกฏหมาย"); + + b.Property("Result") + .HasColumnType("longtext") + .HasComment("ผลดำเนินการพิจารณา"); + + b.Property("SalaryPeriod") + .HasColumnType("longtext") + .HasComment("รอบเงินเดือน"); + + b.Property("SalaryPeriodId") + .HasColumnType("char(36)") + .HasComment("Id เรื่องเงินเดือน"); + + b.Property("SourceOrganizationName") + .HasColumnType("longtext") + .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); + + b.Property("TransferOrganizationName") + .HasColumnType("longtext") + .HasComment("ส่วนราชการที่ให้โอน"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("varchar(4)") + .HasComment("ปีรอบเงินเดือน"); + + b.HasKey("Id"); + + b.HasIndex("CommandStatusId"); + + b.HasIndex("CommandTypeId"); + + b.HasIndex("PlacementId"); + + b.ToTable("Commands"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .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("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("ReceiveUserId") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandDeployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทเอกสาร"); + + b.Property("CommandId") + .HasColumnType("char(36)"); + + 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("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("CommandId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CommandDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CommandId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงคำสั่ง"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text") + .HasComment("หมายเหตุ"); + + b.Property("Comment2") + .IsRequired() + .HasColumnType("text") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RefDisciplineId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); + + b.Property("RefPlacementProfileId") + .HasColumnType("char(36)") + .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับในบัญชีแนบท้าย"); + + b.HasKey("Id"); + + b.HasIndex("CommandId"); + + b.ToTable("CommandReceivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะของคำสั่ง"); + + b.Property("Sequence") + .HasColumnType("int") + .HasComment("ลำดับการทำงาน"); + + b.HasKey("Id"); + + b.ToTable("CommandStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ประเภทคำสั่ง"); + + b.Property("CommandCode") + .IsRequired() + .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("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() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("CommandTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)"); + + 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.ToTable("DeploymentChannels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.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.HR.LimitLeave", 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") + .HasColumnType("longtext") + .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); + + b.HasKey("Id"); + + b.ToTable("LimitLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("NumLeave") + .HasColumnType("double") + .HasComment("จำนวนที่ลาได้"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Ability") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("AvatarRef") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มเลือด"); + + b.Property("CitizenId") + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("รหัสบัตรประชาชน"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนคู่สมรส"); + + b.Property("CoupleFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CoupleLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าคู่สมรส"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUser") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("DateAppoint") + .HasColumnType("datetime(6)"); + + b.Property("DateRetire") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("DutyTimeEffectiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รอบการลงเวลามีผล"); + + b.Property("DutyTimeId") + .HasColumnType("char(36)") + .HasComment("รอบการลงเวลาเข้างาน"); + + b.Property("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeMoneyAllowance") + .HasColumnType("double") + .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); + + b.Property("EmployeeMoneyEmployee") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); + + b.Property("EmployeeMoneyEmployer") + .HasColumnType("double") + .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); + + b.Property("EmployeeMoneyIncrease") + .HasColumnType("double") + .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); + + b.Property("EmployeeOc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("EmployeeTypeIndividual") + .HasColumnType("longtext") + .HasComment("ประเภทบุคคล"); + + b.Property("EmployeeWage") + .HasColumnType("double") + .HasComment("ค่าจ้าง"); + + b.Property("EntryStatus") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("FatherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนบิดา"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าบิดา"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("FirstNameOld") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ(เดิม)"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("GovAgeAbsent") + .HasColumnType("int"); + + b.Property("GovAgePlus") + .HasColumnType("int"); + + b.Property("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsLeave") + .HasColumnType("tinyint(1)"); + + b.Property("IsProbation") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendVerified") + .HasColumnType("tinyint(1)"); + + b.Property("IsTransfer") + .HasColumnType("tinyint(1)"); + + b.Property("IsVerified") + .HasColumnType("tinyint(1)"); + + b.Property("KeycloakId") + .HasColumnType("char(36)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุล"); + + b.Property("LastNameOld") + .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("LeaveDate") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDateOrder") + .HasColumnType("datetime(6)"); + + b.Property("LeaveDetail") + .HasColumnType("longtext"); + + b.Property("LeaveNumberOrder") + .HasColumnType("longtext"); + + b.Property("LeaveReason") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("LimitLeaveId") + .HasColumnType("char(36)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("MotherCareer") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherCitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่บัตรประชาชนมารดา"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherLive") + .HasColumnType("tinyint(1)") + .HasComment("มีชีวิตมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("Physical") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานภาพทางกาย"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("PrefixOldId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า(เดิม)"); + + b.Property("ProfileType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("TransferDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("VerifiedUser") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("GenderId"); + + b.HasIndex("LimitLeaveId"); + + b.HasIndex("PosNoId"); + + b.HasIndex("PositionEmployeeGroupId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.HasIndex("PositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.ToTable("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .HasColumnType("longtext") + .HasComment("ด้าน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAbilitys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("Field") + .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("ProfileAbilityId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAbilityId"); + + b.ToTable("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrict") + .HasColumnType("longtext") + .HasComment("เขตปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตปัจจุบัน"); + + b.Property("CurrentProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดปัจจุบัน"); + + b.Property("CurrentSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ปัจจุบัน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RegistrationAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrict") + .HasColumnType("longtext") + .HasComment("เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตตามทะเบียนบ้าน"); + + b.Property("RegistrationProvince") + .HasColumnType("longtext") + .HasComment("จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดตามทะเบียนบ้าน"); + + b.Property("RegistrationSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); + + b.Property("RegistrationSubDistrict") + .HasColumnType("longtext") + .HasComment("แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id แขวงตามทะเบียนบ้าน"); + + b.Property("RegistrationZipCode") + .HasMaxLength(5) + .HasColumnType("varchar(5)") + .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAssessments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") + .HasColumnType("datetime(6)") + .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("Name") + .HasColumnType("longtext") + .HasComment("ชื่อแบบประเมิน"); + + b.Property("Point1") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); + + b.Property("Point1Total") + .HasColumnType("double") + .HasComment("ส่วนที่1 (คะแนน)"); + + b.Property("Point2") + .HasColumnType("double") + .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); + + b.Property("Point2Total") + .HasColumnType("double") + .HasComment("ส่วนที่2 (คะแนน)"); + + b.Property("PointSum") + .HasColumnType("double") + .HasComment("ผลประเมินรวม (คะแนน)"); + + b.Property("PointSumTotal") + .HasColumnType("double") + .HasComment("ผลรวม (คะแนน)"); + + b.Property("ProfileAssessmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileAssessmentId"); + + b.ToTable("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AvatarFileId") + .HasColumnType("char(36)"); + + 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("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarFileId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileAvatarHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานผู้ออกใบอนุญาต"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileCertificateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileCertificateId"); + + b.ToTable("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChangeNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("LastName") + .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("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileChangeNameId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สถานะ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileChangeNameId"); + + b.ToTable("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileChildrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ChildrenCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบุตร"); + + b.Property("ChildrenFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบุตร"); + + b.Property("ChildrenLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบุตร"); + + b.Property("ChildrenPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบุตร"); + + b.Property("ChildrenPrefixId") + .HasColumnType("char(36)") + .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("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("ProfileChildrenId") + .HasColumnType("char(36)"); + + b.Property("ProfileFamilyHistoryId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileChildrenId"); + + b.HasIndex("ProfileFamilyHistoryId"); + + b.ToTable("ProfileChildrenHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCoupleHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileCurrentAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDisciplines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("Level") + .HasColumnType("longtext") + .HasComment("ระดับความผิด"); + + b.Property("ProfileDisciplineId") + .HasColumnType("char(36)"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDisciplineId"); + + b.ToTable("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileDutys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("Detail") + .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("ProfileDutyId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileDutyId"); + + b.ToTable("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevel") + .HasColumnType("longtext") + .HasComment("ระดับศึกษา"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Id ระดับศึกษา"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); + + b.Property("ProfileEducationId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEducationId"); + + b.ToTable("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ้าง"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileEmployments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Command") + .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("Date") + .HasColumnType("datetime(6)") + .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("ProfileEmploymentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileEmploymentId"); + + b.ToTable("ProfileEmploymentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Couple") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("CoupleCareer") + .HasColumnType("longtext") + .HasComment("อาชีพคู่สมรส"); + + b.Property("CoupleFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อคู่สมรส"); + + b.Property("CoupleLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("CoupleLastNameOld") + .HasColumnType("longtext") + .HasComment("นามสกุลคู่สมรส(เดิม)"); + + b.Property("CouplePrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าคู่สมรส"); + + b.Property("CouplePrefixId") + .HasColumnType("char(36)") + .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("FatherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพบิดา"); + + b.Property("FatherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อบิดา"); + + b.Property("FatherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้าบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("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("MotherCareer") + .HasColumnType("longtext") + .HasComment("อาชีพมารดา"); + + b.Property("MotherFirstName") + .HasColumnType("longtext") + .HasComment("ชื่อมารดา"); + + b.Property("MotherLastName") + .HasColumnType("longtext") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherPrefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้ามารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้ามารดา"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFamilyHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileFatherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") + .HasColumnType("datetime(6)") + .HasComment("วันที่สั่งบรรจุ"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("เริ่มปฎิบัติราชการ"); + + b.Property("GovAge") + .HasColumnType("longtext") + .HasComment("อายุราชการ"); + + b.Property("GovAgeAbsent") + .HasColumnType("int") + .HasComment("ขาดราชการ"); + + b.Property("GovAgePlus") + .HasColumnType("int") + .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("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReasonSameDate") + .HasColumnType("longtext") + .HasComment("เหตุผลกรณีไม่ตรงวัน"); + + b.Property("RetireDate") + .HasColumnType("longtext") + .HasComment("วันเกษียณอายุ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileGovernmentHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("BloodGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มเลือด"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)") + .HasComment("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("EmployeeClass") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทลูกจ้าง"); + + b.Property("EmployeeType") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ประเภทการจ้าง"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("Gender") + .HasColumnType("longtext") + .HasComment("เพศ"); + + b.Property("GenderId") + .HasColumnType("char(36)") + .HasComment("Id เพศ"); + + 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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Relationship") + .HasColumnType("longtext") + .HasComment("สถานะภาพ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานะภาพ"); + + b.Property("Religion") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ReligionId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลา"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่ออก"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileHonors"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasComment("รายละเอียด"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("ProfileHonorId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileHonorId"); + + b.ToTable("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("RefCommandDate") + .HasColumnType("datetime(6)") + .HasComment("เอกสารอ้างอิง (ลงวันที่)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileInsignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") + .HasColumnType("datetime(6)") + .HasComment("วันที่ประกาศในราชกิจจาฯ"); + + b.Property("Insignia") + .HasColumnType("longtext") + .HasComment("ชื่อเครื่องราชฯ"); + + b.Property("InsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaType") + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("Issue") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .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("No") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("ลำดับที่"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("Page") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("หน้า"); + + b.Property("ProfileInsigniaId") + .HasColumnType("char(36)"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("ลงวันที่"); + + b.Property("Section") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("ตอน"); + + b.Property("Volume") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่ม"); + + b.Property("VolumeNo") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasComment("เล่มที่"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileInsigniaId"); + + b.ToTable("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); + + b.Property("DateStartLeave") + .HasColumnType("datetime(6)") + .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("NumLeave") + .HasColumnType("double") + .HasComment("ลาครั้งที่"); + + b.Property("ProfileLeaveId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะ"); + + b.Property("SumLeave") + .HasColumnType("double") + .HasComment("ลามาแล้ว"); + + b.Property("TotalLeave") + .HasColumnType("double") + .HasComment("รวมเป็น"); + + b.Property("TypeLeaveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileLeaveId"); + + b.HasIndex("TypeLeaveId"); + + b.ToTable("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") + .HasColumnType("tinyint(1)"); + + 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("LeaveYear") + .HasColumnType("int"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("SumAbsent") + .HasColumnType("longtext"); + + b.Property("SumEducation") + .HasColumnType("longtext"); + + b.Property("SumLate") + .HasColumnType("longtext"); + + b.Property("SumRest") + .HasColumnType("longtext"); + + b.Property("SumSick") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileLeaveSummary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Career") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileMotherHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileNopaids"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี"); + + b.Property("Detail") + .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("ProfileNopaidId") + .HasColumnType("char(36)"); + + b.Property("Reference") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileNopaidId"); + + b.ToTable("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงานที่สังกัด"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasComment("User Id KeyCloak"); + + b.HasKey("Id"); + + b.ToTable("ProfileOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .HasColumnType("longtext") + .HasComment("รายละเอียด"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("Detail") + .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("ProfileOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileOtherId"); + + b.ToTable("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CategoryName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .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("Detail") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasComment("ชื่อไฟล์"); + + 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.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePapers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("DistrictId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileRegistrationAddressHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyName") + .HasColumnType("longtext") + .HasComment("AgencyName"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("CLevel") + .HasColumnType("longtext") + .HasComment("CLevel"); + + b.Property("CommandNo") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เลขที่คำสั่ง"); + + b.Property("CommandTypeName") + .IsRequired() + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วัน เดือน ปี รับตำแหน่ง"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + 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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("Order") + .HasColumnType("int") + .HasComment("ลำดับ"); + + b.Property("OrgName") + .HasColumnType("longtext") + .HasComment("OrgName"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("Id ชื่อย่อหน่วยงาน"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("PosNoName") + .HasColumnType("longtext") + .HasComment("PosNoName"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveName") + .HasColumnType("longtext") + .HasComment("PositionExecutiveName"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelName") + .HasColumnType("longtext"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionLineName") + .HasColumnType("longtext") + .HasComment("PositionLineName"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("PositionName"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionPathSideName") + .HasColumnType("longtext") + .HasComment("PositionPathSideName"); + + b.Property("PositionRef") + .HasColumnType("longtext"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("PositionTypeName") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RefCommandNo") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("SalaryStatus") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileSalaries"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .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("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Oc") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("OcId") + .HasColumnType("char(36)") + .HasComment("Id สังกัด"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("PosNo") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("PosNoEmployee") + .HasColumnType("longtext") + .HasComment("เลขที่ตำแหน่งลูกจ้าง"); + + b.Property("PosNoId") + .HasColumnType("char(36)") + .HasComment("Id เลขที่ตำแหน่ง"); + + b.Property("Position") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeeGroup") + .HasColumnType("longtext") + .HasComment("กลุ่มงาน"); + + b.Property("PositionEmployeeGroupId") + .HasColumnType("char(36)") + .HasComment("Id กลุ่มงาน"); + + b.Property("PositionEmployeeLevel") + .HasColumnType("longtext") + .HasComment("ระดับชั้นงาน"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับชั้นงาน"); + + b.Property("PositionEmployeePosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionEmployeePositionSide") + .HasColumnType("longtext") + .HasComment("ด้านของตำแหน่ง"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านของตำแหน่ง"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางการบริหาร"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้านทางการบริหาร"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับ"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment(" Id ระดับ"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("PositionLineId") + .HasColumnType("char(36)") + .HasComment("Id สายงาน"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("Id ด้าน/สาขา"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("Id ประเภทตำแหน่ง"); + + b.Property("ProfileSalaryId") + .HasColumnType("char(36)"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.HasKey("Id"); + + b.HasIndex("ProfileSalaryId"); + + b.ToTable("ProfileSalaryHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PositionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionId"); + + b.ToTable("ProfileSalaryPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionsNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasComment("ไม่ใช้"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("ProfileSalaryPositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfileTrainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") + .HasColumnType("datetime(6)") + .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); + + b.Property("Department") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); + + b.Property("Duration") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .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("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); + + b.Property("NumberOrder") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สถานที่ฝึกอบรม/ดูงาน"); + + b.Property("ProfileTrainingId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); + + b.Property("Topic") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); + + b.Property("Yearly") + .HasMaxLength(200) + .HasColumnType("int") + .HasComment("ปีที่อบรม (พ.ศ.)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileTrainingId"); + + b.ToTable("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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") + .HasColumnType("longtext") + .HasComment("ประเภทการลา"); + + b.HasKey("Id"); + + b.ToTable("TypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") + .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("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaId"); + + b.ToTable("InsigniaManages"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") + .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("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนทั้งหมด"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaManageId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.ToTable("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BorrowDate") + .HasColumnType("datetime(6)") + .HasComment("ยืมวันที่"); + + b.Property("BorrowOrganizationId") + .HasColumnType("char(36)"); + + 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("InsigniaManageOrganiationId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteProfileId") + .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("ReturnDate") + .HasColumnType("datetime(6)") + .HasComment("คืนวันที่"); + + b.Property("ReturnOrganizationId") + .HasColumnType("char(36)"); + + b.Property("ReturnReason") + .HasColumnType("longtext") + .HasComment("เหตุผลคืน"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการคืน"); + + b.HasKey("Id"); + + b.HasIndex("BorrowOrganizationId"); + + b.HasIndex("InsigniaManageOrganiationId"); + + b.HasIndex("InsigniaNoteProfileId"); + + b.HasIndex("ReturnOrganizationId"); + + b.ToTable("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("InsigniaNotes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .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("Reason") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("InsigniaNoteId"); + + b.ToTable("InsigniaNoteDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่"); + + b.Property("DatePayment") + .HasColumnType("datetime(6)") + .HasComment("วันที่จ่ายใบกำกับ"); + + b.Property("DateReceive") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("DateReceiveInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่รับเครื่องราชฯ"); + + b.Property("DateReturnInsignia") + .HasColumnType("datetime(6)") + .HasComment("วันที่คืนเครื่องราชฯ"); + + b.Property("DocReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("DocReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("InsigniaNoteId") + .HasColumnType("char(36)"); + + b.Property("IsApprove") + .HasColumnType("tinyint(1)"); + + b.Property("Issue") + .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("No") + .HasColumnType("longtext") + .HasComment("ลำดับที่"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); + + b.Property("OrgReceiveInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrgReturnInsigniaId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrganizationReceive") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); + + b.Property("OrganizationOrganizationSend") + .HasColumnType("longtext") + .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); + + b.Property("Page") + .HasColumnType("longtext") + .HasComment("หน้าที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Section") + .HasColumnType("longtext") + .HasComment("ตอนที่"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.Property("TypePayment") + .HasColumnType("longtext") + .HasComment("รูปแบบการจ่าย"); + + b.Property("VolumeNo") + .HasColumnType("longtext") + .HasComment("เล่มที่"); + + b.HasKey("Id"); + + b.HasIndex("DocReceiveInsigniaId"); + + b.HasIndex("DocReturnInsigniaId"); + + b.HasIndex("InsigniaNoteId"); + + b.HasIndex("OrgReceiveInsigniaId"); + + b.HasIndex("OrgReturnInsigniaId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasMaxLength(50) + .HasColumnType("int") + .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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุด"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("IsLock") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการ Freez ข้อมูล"); + + 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") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ราบการยื่นขอ"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่ม"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("ประเภทการขอ"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปี"); + + b.HasKey("Id"); + + b.HasIndex("ReliefDocId"); + + b.ToTable("InsigniaPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("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.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PeriodId") + .HasColumnType("char(36)"); + + b.Property("RequestNote") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PeriodId"); + + b.ToTable("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", 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("IsApprove") + .HasColumnType("tinyint(1)"); + + 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("MarkDiscipline") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน มีโทษทางวินัย"); + + b.Property("MarkLeave") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); + + b.Property("MarkRate") + .HasColumnType("tinyint(1)") + .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); + + b.Property("MatchingConditions") + .HasColumnType("text") + .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการได้รับเครื่องราชฯ"); + + b.Property("ReasonReject") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่ยื่นขอ"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("RequestInsigniaId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะตำแหน่งที่ยื่นขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RequestId"); + + b.HasIndex("RequestInsigniaId"); + + b.ToTable("InsigniaRequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("varchar(2)") + .HasColumnOrder(1) + .HasComment("ชื่อหมู่โลหิต"); + + b.HasKey("Id"); + + b.ToTable("BloodGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ProvinceId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProvinceId"); + + b.ToTable("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ระดับการศึกษา"); + + b.HasKey("Id"); + + b.ToTable("EducationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnOrder(1) + .HasComment("เพศ"); + + b.HasKey("Id"); + + b.ToTable("Genders"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Category") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); + + 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("HolidayDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันหยุด"); + + b.Property("IsSpecial") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(4) + .HasComment("ชื่อวันหยุด"); + + b.Property("OriginalDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันหยุด(Original)"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ประจำปี"); + + b.HasKey("Id"); + + b.ToTable("Holidays"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อเครื่องราช"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเครื่องราช"); + + b.HasKey("Id"); + + b.HasIndex("InsigniaTypeId"); + + b.ToTable("Insignias"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทเครื่องราช"); + + b.HasKey("Id"); + + b.ToTable("InsigniaTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); + + b.HasKey("Id"); + + b.ToTable("OrganizationFaxs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); + + b.HasKey("Id"); + + b.ToTable("OrganizationGovernmentAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationOrganizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AgencyCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .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("GovernmentCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(4) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationShortNames"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelExternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTelInternals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); + + b.HasKey("Id"); + + b.ToTable("OrganizationTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("สถานภาพทางกาย"); + + b.HasKey("Id"); + + b.ToTable("PhysicalStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(3) + .HasComment("ชื่อตำแหน่งทางการบริหาร"); + + b.Property("ExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(9) + .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("Name") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionCategory") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ExecutiveSideId"); + + b.HasIndex("PathSideId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeGroups"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); + + b.HasKey("Id"); + + b.ToTable("PositionEmployeeStatuses"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้านทางการบริหาร"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionExecutiveSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(5) + .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("Level") + .HasColumnType("int") + .HasColumnOrder(4) + .HasComment("ลำดับชั้นของระดับตำแหน่ง"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(3) + .HasComment("ชื่อย่อระดับตำแหน่ง"); + + b.HasKey("Id"); + + b.ToTable("PositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionLines"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสายงาน"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPaths"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อด้าน/สาขา"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("หมายเหตุ"); + + b.HasKey("Id"); + + b.ToTable("PositionPathSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); + + b.HasKey("Id"); + + b.ToTable("PositionStatuss"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ลำดับ"); + + b.HasKey("Id"); + + b.ToTable("PositionTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(2) + .HasComment("รายละเอียดคำนำหน้า"); + + b.HasKey("Id"); + + b.ToTable("Prefixes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("จังหวัด"); + + b.HasKey("Id"); + + b.ToTable("Provinces"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnOrder(1) + .HasComment("ชื่อความสัมพันธ์"); + + b.HasKey("Id"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ศาสนา"); + + b.HasKey("Id"); + + b.ToTable("Religions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("ชื่อย่อเหรียญตรา"); + + b.HasKey("Id"); + + b.ToTable("Royals"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalHierarchys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(2) + .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("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); + + b.HasKey("Id"); + + b.ToTable("RoyalTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .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("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(1) + .HasComment("เขต/อำเภอ"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnOrder(2) + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("DistrictId"); + + b.ToTable("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("Inboxes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") + .HasColumnType("tinyint(1)") + .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); + + b.Property("IsSendEmail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมลล์หรือไม่?"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); + + b.Property("IsSendNotification") + .HasColumnType("tinyint(1)") + .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("MessageContent") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดข้อความ"); + + b.Property("MessagePayLoad") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สิ่งที่แนบมาด้วย"); + + b.Property("ReceiverEmailAddress") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)") + .HasComment("อีเมล์ของผู้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสของผู้รับข้อความ"); + + b.Property("SenderSystem") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ส่งจากระบบงาน"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("MessageQueues"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("DeleteDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ลบข้อมูล"); + + b.Property("IsOpen") + .HasColumnType("tinyint(1)") + .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("OpenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เปิดอ่าน"); + + b.Property("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภทการแจ้งเตือน"); + + b.HasKey("Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext"); + + b.Property("ConditionNote") + .HasColumnType("longtext"); + + 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("Department") + .HasColumnType("longtext"); + + b.Property("Government") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCondition") + .HasColumnType("tinyint(1)"); + + b.Property("IsDirector") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + 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("OrganizationAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)"); + + b.Property("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext"); + + b.Property("Pile") + .HasColumnType("longtext"); + + b.Property("PosNo") + .HasColumnType("longtext"); + + b.Property("PositionCondition") + .HasColumnType("longtext"); + + b.Property("PositionEmployeeLineId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationAgencyId"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationGovernmentAgencyId"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("PositionEmployeeLineId"); + + b.HasIndex("PositionEmployeePositionId"); + + b.HasIndex("PositionEmployeeStatusId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployees"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("OrgEmployeeId"); + + b.HasIndex("ProfileId"); + + b.ToTable("OrganizationEmployeeProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeeLevelId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeeLevelId"); + + b.ToTable("OrganizationPositionEmployeeLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") + .HasColumnType("char(36)"); + + b.Property("PositionEmployeePositionSideId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationEmployeeId"); + + b.HasIndex("PositionEmployeePositionSideId"); + + b.ToTable("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionMasterId"); + + b.ToTable("AvailablePositionLevels"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Agency") + .HasColumnType("longtext") + .HasColumnOrder(14) + .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("Department") + .HasColumnType("longtext") + .HasColumnOrder(16) + .HasComment("ฝ่าย/ส่วน"); + + b.Property("Government") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("ส่วนราชการ"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(10) + .HasComment("OrganizationAgencyId"); + + b.Property("OrganizationFaxId") + .HasColumnType("char(36)"); + + b.Property("OrganizationGovernmentAgencyId") + .HasColumnType("char(36)") + .HasColumnOrder(11) + .HasComment("OrganizationGovernmentAgencyId"); + + b.Property("OrganizationLevelId") + .HasColumnType("char(36)"); + + b.Property("OrganizationOrder") + .HasColumnType("int") + .HasColumnOrder(12) + .HasComment("OrganizationOrder"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.Property("OrganizationStatusId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelExternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTelInternalId") + .HasColumnType("char(36)"); + + b.Property("OrganizationTypeId") + .HasColumnType("char(36)"); + + b.Property("OrganizationUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("OrganizationUserNote"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Pile") + .HasColumnType("longtext") + .HasColumnOrder(17) + .HasComment("กอง"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationFaxId"); + + b.HasIndex("OrganizationLevelId"); + + b.HasIndex("OrganizationOrganizationId"); + + b.HasIndex("OrganizationShortNameId"); + + b.HasIndex("OrganizationStatusId"); + + b.HasIndex("OrganizationTelExternalId"); + + b.HasIndex("OrganizationTelInternalId"); + + b.HasIndex("OrganizationTypeId"); + + b.HasIndex("ParentId"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(3) + .HasComment("Is Director"); + + 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("OrganizationId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionUserNote") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("positionUserNote"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("PositionMasterId"); + + b.HasIndex("PositionNumberId"); + + b.ToTable("OrganizationPositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .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("ObjectValue") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); + + b.HasKey("Id"); + + b.ToTable("OrganizationPublishHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasColumnOrder(2) + .HasComment("PositionId"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatusId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionExecutiveId"); + + b.HasIndex("PositionExecutiveSideId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionStatusId"); + + b.HasIndex("PositionTypeId"); + + b.ToTable("PositionMasters"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") + .HasColumnType("tinyint(1)") + .HasColumnOrder(14) + .HasComment("IsDirector"); + + 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("Position") + .HasColumnType("longtext") + .HasColumnOrder(2) + .HasComment("Position"); + + b.Property("PositionCondition") + .HasColumnType("longtext") + .HasColumnOrder(11) + .HasComment("PositionCondition"); + + b.Property("PositionExecutive") + .HasColumnType("longtext") + .HasColumnOrder(5) + .HasComment("PositionExecutive"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("PositionExecutiveSide"); + + b.Property("PositionExecutiveSideObject") + .HasColumnType("longtext"); + + b.Property("PositionLevel") + .HasColumnType("longtext") + .HasColumnOrder(12) + .HasComment("PositionLevel"); + + b.Property("PositionLine") + .HasColumnType("longtext") + .HasColumnOrder(8) + .HasComment("PositionLine"); + + b.Property("PositionMasterEntityId") + .HasColumnType("char(36)"); + + b.Property("PositionMasterUserNote") + .HasColumnType("longtext") + .HasColumnOrder(13) + .HasComment("PositionMasterUserNote"); + + b.Property("PositionPath") + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("PositionPath"); + + b.Property("PositionPathSide") + .HasColumnType("longtext") + .HasColumnOrder(7) + .HasComment("PositionPathSide"); + + b.Property("PositionPathSideObject") + .HasColumnType("longtext"); + + b.Property("PositionStatus") + .HasColumnType("longtext") + .HasColumnOrder(10) + .HasComment("PositionStatus"); + + b.Property("PositionType") + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("PositionType"); + + b.Property("Qualification") + .HasColumnType("longtext") + .HasColumnOrder(15) + .HasComment("คุณวุฒิ"); + + b.HasKey("Id"); + + b.HasIndex("PositionMasterEntityId"); + + b.ToTable("PositionMasterHistoryEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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") + .HasMaxLength(300) + .HasColumnType("varchar(300)") + .HasColumnOrder(2) + .HasComment("ชื่อ"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationShortNameId"); + + b.ToTable("PositionNumbers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + 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("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("ProfileId"); + + b.ToTable("ProfilePositions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") + .HasColumnType("longtext"); + + b.Property("GovernmentCodeOld") + .HasColumnType("longtext"); + + 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("OrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("OrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("OrganizationOrganizationOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationShortName") + .HasColumnType("longtext"); + + b.Property("OrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ"); + + b.Property("OrganizationShortNameOld") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการเดิม"); + + b.Property("PositionExecutive") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร"); + + b.Property("PositionExecutiveOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหารเดิม"); + + b.Property("PositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("PositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร"); + + b.Property("PositionExecutiveSideOld") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหารเดิม"); + + b.Property("PositionLevel") + .HasColumnType("longtext"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่งเดิม"); + + b.Property("PositionNum") + .HasColumnType("longtext"); + + b.Property("PositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่"); + + b.Property("PositionNumOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่เดิม"); + + b.Property("PositionPath") + .HasColumnType("longtext"); + + b.Property("PositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน"); + + b.Property("PositionPathOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงานเดิม"); + + b.Property("PositionPathSide") + .HasColumnType("longtext"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา"); + + b.Property("PositionPathSideOld") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขาเดิม"); + + b.Property("PositionType") + .HasColumnType("longtext"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่งเดิม"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.ToTable("Report2s"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") + .HasColumnType("longtext"); + + 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.ToTable("Report2DetailHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") + .HasColumnType("longtext") + .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("NewGovernmentCode") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganization") + .HasColumnType("longtext"); + + b.Property("NewOrganizationOrganizationId") + .HasColumnType("char(36)") + .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); + + b.Property("NewOrganizationShortName") + .HasColumnType("longtext"); + + b.Property("NewOrganizationShortNameId") + .HasColumnType("char(36)") + .HasComment("รหัสส่วนราชการ กำหนดใหม่"); + + b.Property("NewPositionExecutive") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); + + b.Property("NewPositionExecutiveSide") + .HasColumnType("longtext"); + + b.Property("NewPositionExecutiveSideId") + .HasColumnType("char(36)") + .HasComment("ด้านทางบริหาร กำหนดใหม่"); + + b.Property("NewPositionLevel") + .HasColumnType("longtext"); + + b.Property("NewPositionLevelId") + .HasColumnType("char(36)") + .HasComment("ระดับตำแหน่ง กำหนดใหม่"); + + b.Property("NewPositionNum") + .HasColumnType("longtext"); + + b.Property("NewPositionNumId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); + + b.Property("NewPositionPath") + .HasColumnType("longtext"); + + b.Property("NewPositionPathId") + .HasColumnType("char(36)") + .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); + + b.Property("NewPositionPathSide") + .HasColumnType("longtext"); + + b.Property("NewPositionPathSideId") + .HasColumnType("char(36)") + .HasComment("ด้าน/สาขา กำหนดใหม่"); + + b.Property("NewPositionType") + .HasColumnType("longtext"); + + b.Property("NewPositionTypeId") + .HasColumnType("char(36)") + .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); + + b.Property("OldGovernmentCode") + .HasColumnType("longtext"); + + b.Property("OldOrganizationOrganization") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); + + b.Property("OldOrganizationShortName") + .HasColumnType("longtext") + .HasComment("รหัสส่วนราชการ กำหนดเดิม"); + + b.Property("OldPositionExecutive") + .HasColumnType("longtext") + .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); + + b.Property("OldPositionExecutiveSide") + .HasColumnType("longtext") + .HasComment("ด้านทางบริหาร กำหนดเดิม"); + + b.Property("OldPositionLevel") + .HasColumnType("longtext") + .HasComment("ระดับตำแหน่ง กำหนดเดิม"); + + b.Property("OldPositionNum") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); + + b.Property("OldPositionPath") + .HasColumnType("longtext") + .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); + + b.Property("OldPositionPathSide") + .HasColumnType("longtext") + .HasComment("ด้าน/สาขา กำหนดเดิม"); + + b.Property("OldPositionType") + .HasColumnType("longtext") + .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("ProfilePositionId") + .HasColumnType("char(36)") + .HasComment("สังกัดที่ถือครอง"); + + b.Property("Report2DetailHistoryId") + .HasColumnType("char(36)"); + + b.Property("Salary") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("SalaryMonth") + .HasColumnType("double") + .HasComment("เงินตอบแทนรายเดือน"); + + b.Property("SalaryPosition") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะการเปลี่ยนแปลง"); + + b.HasKey("Id"); + + b.HasIndex("Report2DetailHistoryId"); + + b.ToTable("Report2Histories"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สิ้นสุดบัญชี"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รอบการสอบ"); + + b.Property("Number") + .HasMaxLength(10) + .HasColumnType("int") + .HasComment("จำนวนผู้สอบได้"); + + b.Property("PlacementTypeId") + .HasColumnType("char(36)"); + + b.Property("Round") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ครั้งที่"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่เริ่มบัญชีบัญชี"); + + b.Property("Year") + .HasMaxLength(5) + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("PlacementTypeId"); + + b.ToTable("Placements"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.Property("type") + .HasColumnType("longtext") + .HasComment("ประเภทราชการ"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.ToTable("PlacementAppointments"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("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.Property("PlacementAppointmentId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementAppointmentId"); + + b.ToTable("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขที่ใบอนุญาต"); + + b.Property("CertificateType") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .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("ExpireDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่หมดอายุ"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกใบอนุญาต"); + + b.Property("Issuer") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .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("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Country") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .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("Degree") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("วุฒิการศึกษา"); + + b.Property("Duration") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ระยะเวลา"); + + b.Property("DurationYear") + .HasColumnType("int") + .HasComment("ระยะเวลาหลักสูตร"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)") + .HasComment("ถึง"); + + b.Property("Field") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("สาขาวิชา/ทาง"); + + b.Property("FinishDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สำเร็จการศึกษา"); + + b.Property("FundName") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ทุน"); + + b.Property("Gpa") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เกรดเฉลี่ย"); + + b.Property("Institute") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("สถานศึกษา"); + + b.Property("IsDate") + .HasColumnType("tinyint(1)") + .HasComment("ประเภทช่วงเวลาการศึกษา"); + + b.Property("IsEducation") + .HasColumnType("tinyint(1)") + .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("Other") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasComment("ข้อมูลการติดต่อ"); + + b.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่"); + + b.HasKey("Id"); + + b.HasIndex("EducationLevelId"); + + b.HasIndex("PlacementProfileId"); + + b.HasIndex("PositionPathId"); + + b.ToTable("PlacementEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อคุณสมบัติ"); + + b.HasKey("Id"); + + b.ToTable("PlacementIsProperties"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("DateEnd") + .HasColumnType("datetime(6)") + .HasComment("ถึงวันที่"); + + b.Property("DateStart") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementOfficers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)"); + + 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("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Draft") + .HasColumnType("tinyint(1)") + .HasComment("ข้อมูลตำแหน่ง Draft"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamNumber") + .HasColumnType("int") + .HasComment("ลำดับที่สอบได้"); + + b.Property("ExamRound") + .HasColumnType("int") + .HasComment("จำนวนครั้งที่สมัครสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)"); + + b.Property("Firstname") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsOfficer") + .HasColumnType("tinyint(1)") + .HasComment("ข้าราชการฯ กทม."); + + b.Property("IsProperty") + .HasColumnType("longtext") + .HasComment("การคัดกรองคุณสมบัติ"); + + b.Property("IsRelief") + .HasColumnType("tinyint(1)") + .HasComment("ผ่อนผัน"); + + b.Property("Knowledge") + .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("Lastname") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)"); + + b.Property("MobilePhone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)"); + + b.Property("MouthSalaryAmount") + .HasColumnType("double") + .HasComment("เงินค่าตอบแทนรายเดือน"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("สัญชาติ"); + + b.Property("OccupationGroup") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); + + b.Property("OccupationOrg") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); + + b.Property("OccupationPile") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน กอง"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน สังกัด"); + + b.Property("OccupationPositionType") + .HasColumnType("longtext") + .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); + + b.Property("OccupationSalary") + .HasColumnType("int") + .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PlacementId") + .HasColumnType("char(36)"); + + b.Property("PlacementStatus") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะการบรรจุ"); + + b.Property("PointA") + .HasColumnType("double") + .HasComment("คะแนนภาค ก"); + + b.Property("PointB") + .HasColumnType("double") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("double") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalA") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ก"); + + b.Property("PointTotalB") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("double") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PosNumber") + .HasColumnType("int") + .HasComment("ชื่อตำแหน่งเลขที่"); + + b.Property("PosPath") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("PositionCandidateId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionSalaryAmount") + .HasColumnType("double") + .HasComment("เงินประจำตำแหน่ง"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("เชื้อชาติ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลสละสิทธิ์"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReliefDocId") + .HasColumnType("char(36)"); + + b.Property("ReliefReason") + .HasColumnType("longtext") + .HasComment("เหตุผลผ่อนผัน"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("RemarkVertical") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวตั้ง"); + + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + + b.Property("SalaryClass") + .HasColumnType("longtext") + .HasComment("ตำแหน่ง (รายละเอียด)"); + + b.Property("SalaryRef") + .HasColumnType("longtext") + .HasComment("เอกสารอ้างอิง"); + + b.Property("Telephone") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("โทรศัพท์"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("orgTreeShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน"); + + b.Property("organizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + 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("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("CitizenDistrictId"); + + b.HasIndex("CitizenProvinceId"); + + b.HasIndex("CurrentDistrictId"); + + b.HasIndex("CurrentProvinceId"); + + b.HasIndex("CurrentSubDistrictId"); + + b.HasIndex("FatherPrefixId"); + + b.HasIndex("GenderId"); + + b.HasIndex("MarryPrefixId"); + + b.HasIndex("MotherPrefixId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PlacementId"); + + b.HasIndex("PositionCandidateId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileImgId"); + + b.HasIndex("RegistDistrictId"); + + b.HasIndex("RegistProvinceId"); + + b.HasIndex("RegistSubDistrictId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReliefDocId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("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.Property("PlacementProfileId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementProfileId"); + + b.ToTable("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("AvatarId") + .HasColumnType("char(36)"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + 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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับโอนราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1"); + + b.Property("child1Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1"); + + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + + b.Property("child1ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1"); + + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + + b.Property("child2") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2"); + + b.Property("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3"); + + b.Property("child3Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3"); + + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + + b.Property("child3ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3"); + + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + + b.Property("child4") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4"); + + b.Property("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("node") + .HasColumnType("int") + .HasComment("ระดับโครงสร้าง"); + + b.Property("nodeId") + .HasColumnType("char(36)") + .HasComment("id โครงสร้าง"); + + b.Property("orgRevisionId") + .HasColumnType("longtext") + .HasComment("id revision"); + + b.Property("posLevelId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง"); + + b.Property("posLevelName") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง"); + + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + + b.Property("posMasterNo") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง"); + + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + + b.Property("posTypeId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง"); + + b.Property("posTypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง"); + + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("positionField") + .HasColumnType("longtext") + .HasComment("สายงาน"); + + b.Property("positionId") + .HasColumnType("longtext") + .HasComment("id ตำแหน่ง"); + + b.Property("positionOld") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน old"); + + b.Property("posmasterId") + .HasColumnType("longtext") + .HasComment("id อัตรากำลัง"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + + b.HasKey("Id"); + + b.HasIndex("AvatarId"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementReceives"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("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.Property("PlacementReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementReceiveId"); + + b.ToTable("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("BloodGroupId") + .HasColumnType("char(36)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .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("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("Firstname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("GenderId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Lastname") + .IsRequired() + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + b.Property("Nationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติ"); + + b.Property("OrganizationPositionId") + .HasColumnType("char(36)"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionLevelId") + .HasColumnType("char(36)"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionLineId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberId") + .HasColumnType("char(36)"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionPathId") + .HasColumnType("char(36)"); + + b.Property("PositionPathSideId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeId") + .HasColumnType("char(36)"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("PrefixId") + .HasColumnType("char(36)"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Race") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("เชื้อชาติ"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)"); + + b.Property("ReligionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("TelephoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("เบอร์โทร"); + + b.HasKey("Id"); + + b.HasIndex("BloodGroupId"); + + b.HasIndex("GenderId"); + + b.HasIndex("OrganizationPositionId"); + + b.HasIndex("PositionLevelId"); + + b.HasIndex("PositionLineId"); + + b.HasIndex("PositionNumberId"); + + b.HasIndex("PositionPathId"); + + b.HasIndex("PositionPathSideId"); + + b.HasIndex("PositionTypeId"); + + b.HasIndex("PrefixId"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("ReligionId"); + + b.ToTable("PlacementRelocations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("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.Property("PlacementRelocationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementRelocationId"); + + b.ToTable("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("DateRepatriation") + .HasColumnType("datetime(6)") + .HasComment("ส่งตัวกลับตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("PlacementRepatriations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("PlacementTransfers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("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.Property("PlacementTransferId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PlacementTransferId"); + + b.ToTable("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("IsActive") + .HasColumnType("tinyint(1)") + .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("Name") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อประเภทบรรจุ"); + + b.HasKey("Id"); + + b.ToTable("PlacementTypes"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text") + .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("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNoti") + .HasColumnType("tinyint(1)") + .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("Payload") + .IsRequired() + .HasColumnType("text") + .HasComment("สิงที่แนบมาด้วย"); + + b.Property("ReceiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ได้รับ"); + + b.Property("ReceiverUserId") + .HasColumnType("char(36)") + .HasComment("รหัสผู้รับข้อความ"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("หัวเรื่อง"); + + b.HasKey("Id"); + + b.ToTable("CronjobNotiProbations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") + .HasColumnType("datetime(6)") + .HasComment("วันที่เสียชีวิต"); + + b.Property("DocumentForwardId") + .HasColumnType("char(36)"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ออกใบมรณบัตร"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("เลขที่ใบมรณบัตร"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลการเสียชีวิต"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("DocumentForwardId"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementDeceaseds"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenId") + .IsRequired() + .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("DocumentId") + .HasColumnType("char(36)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อ"); + + b.Property("IsSendInbox") + .HasColumnType("tinyint(1)") + .HasComment("ส่งกล่องข้อความหรือไม่?"); + + b.Property("IsSendMail") + .HasColumnType("tinyint(1)") + .HasComment("ส่งอีเมล์หรือไม่?"); + + b.Property("IsSendNotification") + .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("OrganizationName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); + + b.Property("PositionName") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); + + b.Property("Prefix") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("คำนำหน้านาม"); + + b.Property("RetirementDeceasedId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementDeceasedId"); + + b.ToTable("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementDischarges"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementExpulsions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Amount") + .HasColumnType("double") + .HasComment("เงินเดือน"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("CommandTypeId") + .HasColumnType("char(36)"); + + 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("EducationOld") + .HasColumnType("longtext") + .HasComment("วุฒิ/สาขาเดิม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("MilitaryDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่พ้นจากราชการทหาร"); + + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("PositionDate") + .HasColumnType("datetime(6)") + .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่รับย้ายราชการ"); + + b.Property("RecruitDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่บรรจุ"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.HasIndex("CommandTypeId"); + + b.ToTable("RetirementOthers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("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.Property("RetirementOtherId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementOtherId"); + + b.ToTable("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AmountOld") + .HasColumnType("double") + .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("Date") + .HasColumnType("datetime(6)") + .HasComment("ตั้งแต่วันที่"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .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("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Status") + .IsRequired() + .HasColumnType("longtext") + .HasComment("สถานะคำขอ"); + + b.Property("child1") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child2Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2"); + + b.Property("child2ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2"); + + b.Property("child3") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน 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("child4Id") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4"); + + b.Property("child4ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4"); + + b.Property("citizenId") + .HasColumnType("longtext") + .HasComment("เลขบัตรประชาชน"); + + b.Property("firstName") + .HasColumnType("longtext") + .HasComment("ชื่อ"); + + b.Property("lastName") + .HasColumnType("longtext") + .HasComment("นามสกุล"); + + 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("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + + b.Property("prefix") + .HasColumnType("longtext") + .HasComment("คำนำหน้า"); + + b.Property("profileId") + .HasColumnType("longtext") + .HasComment("profile Id"); + + b.Property("root") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root"); + + b.Property("rootId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root"); + + b.Property("rootShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root"); + + b.HasKey("Id"); + + b.ToTable("RetirementOuts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.ToTable("RetirementPeriods"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายละเอียดมติ อกก"); + + 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.Property("ProfileFile") + .IsRequired() + .HasColumnType("longtext") + .HasComment("รายชื่อเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.Property("Round") + .HasColumnType("int") + .HasComment("ครั้งที่"); + + b.Property("SignDate") + .HasColumnType("datetime(6)") + .HasComment("ประกาศ ณ วันที่"); + + b.Property("Total") + .HasColumnType("int") + .HasComment("จำนวนคน"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ประเภท"); + + b.Property("TypeReport") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementPeriodHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") + .HasColumnType("int") + .HasComment("ลำดับที่"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasComment("เหตุผล"); + + b.Property("Remove") + .IsRequired() + .HasColumnType("longtext") + .HasComment("ลบออกจากเกษียญ"); + + b.Property("RetirementPeriodId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.HasIndex("RetirementPeriodId"); + + b.ToTable("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Adjust") + .HasColumnType("longtext") + .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AdjustOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); + + b.Property("AppointDate") + .HasColumnType("datetime(6)") + .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); + + b.Property("Comment") + .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("ExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("ExitFactorOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); + + b.Property("FutureWork") + .HasColumnType("tinyint(1)") + .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("FutureWorkReason") + .HasColumnType("longtext") + .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Havejob") + .HasColumnType("tinyint(1)") + .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("HavejobReason") + .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("NotExitFactor") + .HasColumnType("longtext") + .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("RealReason") + .HasColumnType("longtext") + .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); + + b.Property("ReasonWork") + .HasColumnType("longtext") + .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("ReasonWorkOther") + .HasColumnType("longtext") + .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); + + b.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.Property("Score1") + .HasColumnType("int") + .HasComment("คะแนนข้อ 1"); + + b.Property("Score10") + .HasColumnType("int") + .HasComment("คะแนนข้อ 10"); + + b.Property("Score2") + .HasColumnType("int") + .HasComment("คะแนนข้อ 2"); + + b.Property("Score3") + .HasColumnType("int") + .HasComment("คะแนนข้อ 3"); + + b.Property("Score4") + .HasColumnType("int") + .HasComment("คะแนนข้อ 4"); + + b.Property("Score5") + .HasColumnType("int") + .HasComment("คะแนนข้อ 5"); + + b.Property("Score6") + .HasColumnType("int") + .HasComment("คะแนนข้อ 6"); + + b.Property("Score7") + .HasColumnType("int") + .HasComment("คะแนนข้อ 7"); + + b.Property("Score8") + .HasColumnType("int") + .HasComment("คะแนนข้อ 8"); + + b.Property("Score9") + .HasColumnType("int") + .HasComment("คะแนนข้อ 9"); + + b.Property("ScoreTotal") + .HasColumnType("int") + .HasComment("คะแนนรวม"); + + b.Property("SuggestFriends") + .HasColumnType("tinyint(1)") + .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("SuggestFriendsReason") + .HasColumnType("longtext") + .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); + + b.Property("Suggestion") + .HasColumnType("longtext") + .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); + + b.Property("TimeThink") + .HasColumnType("int") + .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); + + b.HasKey("Id"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 10"); + + b.Property("Question10Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 10"); + + b.Property("Question10Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 10"); + + b.Property("Question1Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 1"); + + b.Property("Question1Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 1"); + + b.Property("Question1Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 1"); + + b.Property("Question2Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 2"); + + b.Property("Question2Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 2"); + + b.Property("Question2Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 2"); + + b.Property("Question3Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 3"); + + b.Property("Question3Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 3"); + + b.Property("Question3Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 3"); + + b.Property("Question4Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 4"); + + b.Property("Question4Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 4"); + + b.Property("Question4Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 4"); + + b.Property("Question5Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 5"); + + b.Property("Question5Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 5"); + + b.Property("Question5Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 5"); + + b.Property("Question6Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 6"); + + b.Property("Question6Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 6"); + + b.Property("Question6Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 6"); + + b.Property("Question7Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 7"); + + b.Property("Question7Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 7"); + + b.Property("Question7Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 7"); + + b.Property("Question8Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 8"); + + b.Property("Question8Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 8"); + + b.Property("Question8Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 8"); + + b.Property("Question9Answer") + .HasColumnType("longtext") + .HasComment("กรอกคะแนน 9"); + + b.Property("Question9Desc") + .HasColumnType("longtext") + .HasComment("คำถามข้อที่ 9"); + + b.Property("Question9Score") + .HasColumnType("longtext") + .HasComment("คำตอบข้อที่ 9"); + + b.HasKey("Id"); + + b.ToTable("RetirementQuestionnaireQuestions"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ActiveDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ขอออกราชการ"); + + b.Property("AmountOld") + .HasColumnType("double") + .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); + + b.Property("ApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติ"); + + b.Property("CommanderApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); + + b.Property("CommanderReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); + + b.Property("CommanderRejectReason") + .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("IsActive") + .HasColumnType("tinyint(1)") + .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("Location") + .HasColumnType("longtext") + .HasComment("สถานที่ยื่นขอลาออกราชการ"); + + b.Property("OligarchApproveReason") + .HasColumnType("longtext") + .HasComment("เหตุผลอนุมัติผู้ดูแล"); + + b.Property("OligarchReject") + .HasColumnType("tinyint(1)") + .HasComment("สถานะยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยับยั้งผู้ดูแล"); + + b.Property("OligarchRejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลยับยั้งผู้ดูแล"); + + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด"); + + b.Property("PositionLevelOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); + + b.Property("PositionNumberOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + + b.Property("PositionTypeOld") + .HasColumnType("longtext") + .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); + + b.Property("ProfileId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasComment("เหตุผลที่ลาออกจากราชการ"); + + b.Property("RejectReason") + .HasColumnType("longtext") + .HasComment("เหตุผลไม่อนุมัติ"); + + b.Property("RemarkHorizontal") + .HasColumnType("longtext") + .HasComment("หมายเหตุแนวนอน"); + + b.Property("SendDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ยื่นขอออกราชการ"); + + b.Property("Status") + .HasColumnType("longtext") + .HasComment("สถานะลาออก"); + + b.HasKey("Id"); + + b.HasIndex("ProfileId"); + + b.ToTable("RetirementResigns"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("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.Property("RetirementResignId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RetirementResignId"); + + b.ToTable("RetirementResignDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") + .WithMany() + .HasForeignKey("CommandStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany() + .HasForeignKey("PlacementId"); + + b.Navigation("CommandStatus"); + + b.Navigation("CommandType"); + + b.Navigation("Placement"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Deployments") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Documents") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") + .WithMany("Receivers") + .HasForeignKey("CommandId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Command"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany("LimitTypeLeaves") + .HasForeignKey("TypeLeaveId"); + + b.Navigation("LimitLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") + .WithMany("Profiles") + .HasForeignKey("LimitLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") + .WithMany() + .HasForeignKey("PosNoId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") + .WithMany() + .HasForeignKey("PositionEmployeeGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.Navigation("Avatar"); + + b.Navigation("Gender"); + + b.Navigation("LimitLeave"); + + b.Navigation("PosNo"); + + b.Navigation("Position"); + + b.Navigation("PositionEmployeeGroup"); + + b.Navigation("PositionEmployeeLevel"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeePositionSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Abilitys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") + .WithMany("ProfileAbilityHistorys") + .HasForeignKey("ProfileAbilityId"); + + b.Navigation("ProfileAbility"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AddressHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Assessments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") + .WithMany("ProfileAssessmentHistorys") + .HasForeignKey("ProfileAssessmentId"); + + b.Navigation("ProfileAssessment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") + .WithMany() + .HasForeignKey("AvatarFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("AvatarHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AvatarFile"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Certificates") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") + .WithMany("ProfileCertificateHistorys") + .HasForeignKey("ProfileCertificateId"); + + b.Navigation("ProfileCertificate"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ChangeNames") + .HasForeignKey("ProfileId"); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") + .WithMany("ProfileChangeNameHistorys") + .HasForeignKey("ProfileChangeNameId"); + + b.Navigation("Document"); + + b.Navigation("ProfileChangeName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Childrens") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) + .WithMany("ProfileChildrenHistorys") + .HasForeignKey("ProfileChildrenId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) + .WithMany("Childrens") + .HasForeignKey("ProfileFamilyHistoryId"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CoupleHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("CurrentAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Disciplines") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") + .WithMany("ProfileDisciplineHistorys") + .HasForeignKey("ProfileDisciplineId"); + + b.Navigation("ProfileDiscipline"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Dutys") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") + .WithMany("ProfileDutyHistorys") + .HasForeignKey("ProfileDutyId"); + + b.Navigation("ProfileDuty"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Educations") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") + .WithMany("ProfileEducationHistorys") + .HasForeignKey("ProfileEducationId"); + + b.Navigation("ProfileEducation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Employments") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") + .WithMany() + .HasForeignKey("ProfileEmploymentId"); + + b.Navigation("ProfileEmployment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FamilyHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("FatherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("GovernmentHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("ProfileHistory") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Honors") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") + .WithMany("ProfileHonorHistorys") + .HasForeignKey("ProfileHonorId"); + + b.Navigation("ProfileHonor"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Insignias") + .HasForeignKey("ProfileId"); + + b.Navigation("Insignia"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") + .WithMany("ProfileInsigniaHistorys") + .HasForeignKey("ProfileInsigniaId"); + + b.Navigation("ProfileInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Leaves") + .HasForeignKey("ProfileId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("Profile"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") + .WithMany("ProfileLeaveHistorys") + .HasForeignKey("ProfileLeaveId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") + .WithMany() + .HasForeignKey("TypeLeaveId"); + + b.Navigation("ProfileLeave"); + + b.Navigation("TypeLeave"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("LeaveSummary") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("MotherHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Nopaids") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") + .WithMany("ProfileNopaidHistorys") + .HasForeignKey("ProfileNopaidId"); + + b.Navigation("ProfileNopaid"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Others") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") + .WithMany("ProfileOtherHistorys") + .HasForeignKey("ProfileOtherId"); + + b.Navigation("ProfileOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Papers") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("RegistrationAddressHistory") + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Salaries") + .HasForeignKey("ProfileId"); + + b.Navigation("PositionLevel"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") + .WithMany("ProfileSalaryHistorys") + .HasForeignKey("ProfileSalaryId"); + + b.Navigation("ProfileSalary"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") + .WithMany() + .HasForeignKey("PositionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany("Trainings") + .HasForeignKey("ProfileId"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") + .WithMany("ProfileTrainingHistorys") + .HasForeignKey("ProfileTrainingId"); + + b.Navigation("ProfileTraining"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") + .WithMany() + .HasForeignKey("InsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Insignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") + .WithMany("InsigniaManageOrganiations") + .HasForeignKey("InsigniaManageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsigniaManage"); + + b.Navigation("OrganizationOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "BorrowOrganization") + .WithMany() + .HasForeignKey("BorrowOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") + .WithMany("InsigniaManageProfiles") + .HasForeignKey("InsigniaManageOrganiationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") + .WithMany() + .HasForeignKey("InsigniaNoteProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "ReturnOrganization") + .WithMany() + .HasForeignKey("ReturnOrganizationId"); + + b.Navigation("BorrowOrganization"); + + b.Navigation("InsigniaManageOrganiation"); + + b.Navigation("InsigniaNoteProfile"); + + b.Navigation("ReturnOrganization"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteDocs") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("InsigniaNote"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") + .WithMany() + .HasForeignKey("DocReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") + .WithMany() + .HasForeignKey("DocReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") + .WithMany("InsigniaNoteProfiles") + .HasForeignKey("InsigniaNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia") + .WithMany() + .HasForeignKey("OrgReceiveInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia") + .WithMany() + .HasForeignKey("OrgReturnInsigniaId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocReceiveInsignia"); + + b.Navigation("DocReturnInsignia"); + + b.Navigation("InsigniaNote"); + + b.Navigation("OrgReceiveInsignia"); + + b.Navigation("OrgReturnInsignia"); + + b.Navigation("Profile"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.Navigation("ReliefDoc"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") + .WithMany("InsigniaRequests") + .HasForeignKey("PeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("Organization"); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") + .WithMany("RequestProfiles") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") + .WithMany() + .HasForeignKey("RequestInsigniaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("Request"); + + b.Navigation("RequestInsignia"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") + .WithMany("Districts") + .HasForeignKey("ProvinceId"); + + b.Navigation("Province"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") + .WithMany() + .HasForeignKey("InsigniaTypeId"); + + b.Navigation("InsigniaType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") + .WithMany() + .HasForeignKey("ExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") + .WithMany() + .HasForeignKey("PathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("ExecutiveSide"); + + b.Navigation("PathSide"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") + .WithMany("SubDistricts") + .HasForeignKey("DistrictId"); + + b.Navigation("District"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") + .WithMany() + .HasForeignKey("OrganizationAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") + .WithMany() + .HasForeignKey("OrganizationGovernmentAgencyId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") + .WithMany() + .HasForeignKey("PositionEmployeeLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") + .WithMany() + .HasForeignKey("PositionEmployeePositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") + .WithMany() + .HasForeignKey("PositionEmployeeStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("Organization"); + + b.Navigation("OrganizationAgency"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationGovernmentAgency"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("PositionEmployeeLine"); + + b.Navigation("PositionEmployeePosition"); + + b.Navigation("PositionEmployeeStatus"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") + .WithMany("OrganizationEmployeeProfiles") + .HasForeignKey("OrgEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrgEmployee"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeeLevels") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") + .WithMany() + .HasForeignKey("PositionEmployeeLevelId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeeLevel"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => + { + b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") + .WithMany("OrganizationPositionEmployeePositionSides") + .HasForeignKey("OrganizationEmployeeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") + .WithMany() + .HasForeignKey("PositionEmployeePositionSideId"); + + b.Navigation("OrganizationEmployee"); + + b.Navigation("PositionEmployeePositionSide"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionMaster"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") + .WithMany() + .HasForeignKey("OrganizationFaxId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") + .WithMany() + .HasForeignKey("OrganizationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") + .WithMany() + .HasForeignKey("OrganizationOrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") + .WithMany() + .HasForeignKey("OrganizationStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") + .WithMany() + .HasForeignKey("OrganizationTelExternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") + .WithMany() + .HasForeignKey("OrganizationTelInternalId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") + .WithMany() + .HasForeignKey("OrganizationTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") + .WithMany("Organizations") + .HasForeignKey("ParentId"); + + b.Navigation("OrganizationFax"); + + b.Navigation("OrganizationLevel"); + + b.Navigation("OrganizationOrganization"); + + b.Navigation("OrganizationShortName"); + + b.Navigation("OrganizationStatus"); + + b.Navigation("OrganizationTelExternal"); + + b.Navigation("OrganizationTelInternal"); + + b.Navigation("OrganizationType"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") + .WithMany() + .HasForeignKey("PositionMasterId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.Navigation("Organization"); + + b.Navigation("PositionMaster"); + + b.Navigation("PositionNumber"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") + .WithMany() + .HasForeignKey("PositionExecutiveId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") + .WithMany() + .HasForeignKey("PositionExecutiveSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") + .WithMany() + .HasForeignKey("PositionStatusId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.Navigation("PositionExecutive"); + + b.Navigation("PositionExecutiveSide"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionStatus"); + + b.Navigation("PositionType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") + .WithMany("PositionMasterHistorys") + .HasForeignKey("PositionMasterEntityId"); + + b.Navigation("PositionMasterEntity"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") + .WithMany() + .HasForeignKey("OrganizationShortNameId"); + + b.Navigation("OrganizationShortName"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => + { + b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") + .WithMany() + .HasForeignKey("Report2DetailHistoryId"); + + b.Navigation("Report2DetailHistory"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") + .WithMany() + .HasForeignKey("PlacementTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") + .WithMany("PlacementAppointmentDocs") + .HasForeignKey("PlacementAppointmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementAppointment"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => + { + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementCertificates") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.EducationLevel", "EducationLevel") + .WithMany() + .HasForeignKey("EducationLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementEducations") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.Navigation("EducationLevel"); + + b.Navigation("PlacementProfile"); + + b.Navigation("PositionPath"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict") + .WithMany() + .HasForeignKey("CitizenDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince") + .WithMany() + .HasForeignKey("CitizenProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict") + .WithMany() + .HasForeignKey("CurrentDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince") + .WithMany() + .HasForeignKey("CurrentProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict") + .WithMany() + .HasForeignKey("CurrentSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix") + .WithMany() + .HasForeignKey("FatherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix") + .WithMany() + .HasForeignKey("MarryPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix") + .WithMany() + .HasForeignKey("MotherPrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") + .WithMany("PlacementProfiles") + .HasForeignKey("PlacementId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionCandidate") + .WithMany() + .HasForeignKey("PositionCandidateId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict") + .WithMany() + .HasForeignKey("RegistDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince") + .WithMany() + .HasForeignKey("RegistProvinceId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict") + .WithMany() + .HasForeignKey("RegistSubDistrictId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") + .WithMany() + .HasForeignKey("ReliefDocId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("CitizenDistrict"); + + b.Navigation("CitizenProvince"); + + b.Navigation("CurrentDistrict"); + + b.Navigation("CurrentProvince"); + + b.Navigation("CurrentSubDistrict"); + + b.Navigation("FatherPrefix"); + + b.Navigation("Gender"); + + b.Navigation("MarryPrefix"); + + b.Navigation("MotherPrefix"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("Placement"); + + b.Navigation("PositionCandidate"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("ProfileImg"); + + b.Navigation("RegistDistrict"); + + b.Navigation("RegistProvince"); + + b.Navigation("RegistSubDistrict"); + + b.Navigation("Relationship"); + + b.Navigation("ReliefDoc"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") + .WithMany("PlacementProfileDocs") + .HasForeignKey("PlacementProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementProfile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") + .WithMany() + .HasForeignKey("AvatarId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("Avatar"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") + .WithMany("PlacementReceiveDocs") + .HasForeignKey("PlacementReceiveId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementReceive"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") + .WithMany() + .HasForeignKey("BloodGroupId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") + .WithMany() + .HasForeignKey("GenderId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") + .WithMany() + .HasForeignKey("OrganizationPositionId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") + .WithMany() + .HasForeignKey("PositionLevelId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") + .WithMany() + .HasForeignKey("PositionLineId"); + + b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") + .WithMany() + .HasForeignKey("PositionNumberId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") + .WithMany() + .HasForeignKey("PositionPathId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") + .WithMany() + .HasForeignKey("PositionPathSideId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") + .WithMany() + .HasForeignKey("PositionTypeId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") + .WithMany() + .HasForeignKey("PrefixId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") + .WithMany() + .HasForeignKey("RelationshipId"); + + b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") + .WithMany() + .HasForeignKey("ReligionId"); + + b.Navigation("BloodGroup"); + + b.Navigation("Gender"); + + b.Navigation("OrganizationPosition"); + + b.Navigation("PositionLevel"); + + b.Navigation("PositionLine"); + + b.Navigation("PositionNumber"); + + b.Navigation("PositionPath"); + + b.Navigation("PositionPathSide"); + + b.Navigation("PositionType"); + + b.Navigation("Prefix"); + + b.Navigation("Profile"); + + b.Navigation("Relationship"); + + b.Navigation("Religion"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") + .WithMany("PlacementRelocationDocs") + .HasForeignKey("PlacementRelocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementRelocation"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") + .WithMany("PlacementTransferDocs") + .HasForeignKey("PlacementTransferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PlacementTransfer"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") + .WithMany() + .HasForeignKey("DocumentForwardId"); + + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + + b.Navigation("DocumentForward"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") + .WithMany("RetirementDeceasedNotis") + .HasForeignKey("RetirementDeceasedId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementDeceased"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") + .WithMany() + .HasForeignKey("CommandTypeId"); + + b.Navigation("CommandType"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") + .WithMany("RetirementOtherDocs") + .HasForeignKey("RetirementOtherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementOther"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId"); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementPeriodHistorys") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") + .WithMany("RetirementProfiles") + .HasForeignKey("RetirementPeriodId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + + b.Navigation("RetirementPeriod"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => + { + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany() + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") + .WithMany() + .HasForeignKey("ProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => + { + b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") + .WithMany("RetirementResignDocs") + .HasForeignKey("RetirementResignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("RetirementResign"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => + { + b.Navigation("Deployments"); + + b.Navigation("Documents"); + + b.Navigation("Receivers"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => + { + b.Navigation("LimitTypeLeaves"); + + b.Navigation("Profiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => + { + b.Navigation("Abilitys"); + + b.Navigation("AddressHistory"); + + b.Navigation("Assessments"); + + b.Navigation("AvatarHistory"); + + b.Navigation("Certificates"); + + b.Navigation("ChangeNames"); + + b.Navigation("Childrens"); + + b.Navigation("CoupleHistory"); + + b.Navigation("CurrentAddressHistory"); + + b.Navigation("Disciplines"); + + b.Navigation("Dutys"); + + b.Navigation("Educations"); + + b.Navigation("Employments"); + + b.Navigation("FamilyHistory"); + + b.Navigation("FatherHistory"); + + b.Navigation("GovernmentHistory"); + + b.Navigation("Honors"); + + b.Navigation("Insignias"); + + b.Navigation("LeaveSummary"); + + b.Navigation("Leaves"); + + b.Navigation("MotherHistory"); + + b.Navigation("Nopaids"); + + b.Navigation("Others"); + + b.Navigation("Papers"); + + b.Navigation("ProfileHistory"); + + b.Navigation("RegistrationAddressHistory"); + + b.Navigation("Salaries"); + + b.Navigation("Trainings"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => + { + b.Navigation("ProfileAbilityHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => + { + b.Navigation("ProfileAssessmentHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => + { + b.Navigation("ProfileCertificateHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => + { + b.Navigation("ProfileChangeNameHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => + { + b.Navigation("ProfileChildrenHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => + { + b.Navigation("ProfileDisciplineHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => + { + b.Navigation("ProfileDutyHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => + { + b.Navigation("ProfileEducationHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => + { + b.Navigation("Childrens"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => + { + b.Navigation("ProfileHonorHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => + { + b.Navigation("ProfileInsigniaHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => + { + b.Navigation("ProfileLeaveHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => + { + b.Navigation("ProfileNopaidHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => + { + b.Navigation("ProfileOtherHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => + { + b.Navigation("ProfileSalaryHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => + { + b.Navigation("ProfileTrainingHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => + { + b.Navigation("LimitTypeLeaves"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => + { + b.Navigation("InsigniaManageOrganiations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => + { + b.Navigation("InsigniaManageProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => + { + b.Navigation("InsigniaNoteDocs"); + + b.Navigation("InsigniaNoteProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => + { + b.Navigation("InsigniaRequests"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => + { + b.Navigation("RequestProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => + { + b.Navigation("SubDistricts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => + { + b.Navigation("Districts"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => + { + b.Navigation("OrganizationEmployeeProfiles"); + + b.Navigation("OrganizationPositionEmployeeLevels"); + + b.Navigation("OrganizationPositionEmployeePositionSides"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => + { + b.Navigation("Organizations"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => + { + b.Navigation("PositionMasterHistorys"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => + { + b.Navigation("PlacementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => + { + b.Navigation("PlacementAppointmentDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => + { + b.Navigation("PlacementCertificates"); + + b.Navigation("PlacementEducations"); + + b.Navigation("PlacementProfileDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => + { + b.Navigation("PlacementReceiveDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => + { + b.Navigation("PlacementRelocationDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => + { + b.Navigation("PlacementTransferDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => + { + b.Navigation("RetirementDeceasedNotis"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => + { + b.Navigation("RetirementOtherDocs"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => + { + b.Navigation("RetirementPeriodHistorys"); + + b.Navigation("RetirementProfiles"); + }); + + modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => + { + b.Navigation("RetirementResignDocs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.cs b/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.cs new file mode 100644 index 00000000..aca68d7b --- /dev/null +++ b/BMA.EHR.Infrastructure/Migrations/20240503061857_update table PlacementRecive add reportdate.cs @@ -0,0 +1,30 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Infrastructure.Migrations +{ + /// + public partial class updatetablePlacementReciveaddreportdate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ReportingDate", + table: "PlacementAppointments", + type: "datetime(6)", + nullable: true, + comment: "วันที่รายงานตัว"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ReportingDate", + table: "PlacementAppointments"); + } + } +} diff --git a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs index 1df8e1c9..746879ea 100644 --- a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs @@ -11084,9 +11084,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("double") .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - b.Property("CreatedAt") .HasColumnType("datetime(6)") .HasColumnOrder(100) @@ -11106,6 +11103,11 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + b.Property("EducationOld") .HasColumnType("longtext") .HasComment("วุฒิ/สาขาเดิม"); @@ -11133,10 +11135,14 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(102) .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - b.Property("OrganizationPositionOld") + b.Property("OrganizationOld") .HasColumnType("longtext") .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") + .HasColumnType("longtext") + .HasComment("สังกัด/ตำแหน่งเเดิม"); + b.Property("PositionDate") .HasColumnType("datetime(6)") .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); @@ -11149,6 +11155,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -11161,6 +11171,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("datetime(6)") .HasComment("วันที่บรรจุ"); + b.Property("ReportingDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่รายงานตัว"); + b.Property("Status") .IsRequired() .HasColumnType("longtext") @@ -11326,6 +11340,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -11334,10 +11352,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ตำแหน่ง"); - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - b.Property("positionOld") .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน old"); @@ -11382,9 +11396,11 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ประเภทราชการ"); - b.HasKey("Id"); + b.Property("typeCommand") + .HasColumnType("longtext") + .HasComment("ประเภทคำสั่ง"); - b.HasIndex("CommandTypeId"); + b.HasKey("Id"); b.ToTable("PlacementAppointments"); }); @@ -11790,6 +11806,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("หน่วยงานที่ช่วยราชการไป"); + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") .HasColumnType("longtext") .HasComment("สังกัด"); @@ -11802,6 +11822,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -12650,6 +12674,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("varchar(100)") .HasComment("สัญชาติ"); + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") .HasColumnType("longtext") .HasComment("สังกัดเดิม"); @@ -12662,6 +12690,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -12703,10 +12735,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id หน่วยงาน child1"); + b.Property("child1Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child1 old"); + + b.Property("child1OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child1 old"); + b.Property("child1ShortName") .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child1"); + b.Property("child1ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child1 old"); + b.Property("child2") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child2"); @@ -12715,10 +12759,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id หน่วยงาน child2"); + b.Property("child2Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child2 old"); + + b.Property("child2OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child2 old"); + b.Property("child2ShortName") .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child2"); + b.Property("child2ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child2 old"); + b.Property("child3") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child3"); @@ -12727,10 +12783,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id หน่วยงาน child3"); + b.Property("child3Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child3 old"); + + b.Property("child3OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child3 old"); + b.Property("child3ShortName") .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child3"); + b.Property("child3ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child3 old"); + b.Property("child4") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child4"); @@ -12739,10 +12807,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id หน่วยงาน child4"); + b.Property("child4Old") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน child4 old"); + + b.Property("child4OldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน child4 old"); + b.Property("child4ShortName") .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child4"); + b.Property("child4ShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน child4 old"); + b.Property("citizenId") .HasColumnType("longtext") .HasComment("เลขบัตรประชาชน"); @@ -12775,10 +12855,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อระดับตำแหน่ง"); + b.Property("posLevelNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อระดับตำแหน่ง old"); + + b.Property("posLevelOldId") + .HasColumnType("longtext") + .HasComment("id ระดับตำแหน่ง old"); + b.Property("posMasterNo") .HasColumnType("int") .HasComment("เลขที่ตำแหน่ง"); + b.Property("posMasterNoOld") + .HasColumnType("int") + .HasComment("เลขที่ตำแหน่ง old"); + b.Property("posTypeId") .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง"); @@ -12787,6 +12879,18 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อประเภทตำแหน่ง"); + b.Property("posTypeNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทตำแหน่ง old"); + + b.Property("posTypeOldId") + .HasColumnType("longtext") + .HasComment("id ประเภทตำแหน่ง old"); + + b.Property("position") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่งในสายงาน"); + b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -12795,9 +12899,9 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ตำแหน่ง"); - b.Property("positionName") + b.Property("positionOld") .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); + .HasComment("ชื่อตำแหน่งในสายงาน old"); b.Property("posmasterId") .HasColumnType("longtext") @@ -12819,10 +12923,22 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id หน่วยงาน root"); + b.Property("rootOld") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน root old"); + + b.Property("rootOldId") + .HasColumnType("longtext") + .HasComment("id หน่วยงาน root old"); + b.Property("rootShortName") .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน root"); + b.Property("rootShortNameOld") + .HasColumnType("longtext") + .HasComment("ชื่อย่อหน่วยงาน root old"); + b.HasKey("Id"); b.HasIndex("AvatarId"); @@ -13227,6 +13343,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("หน่วยงานที่ส่งตัวกลับไป"); + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") .HasColumnType("longtext") .HasComment("สังกัด"); @@ -13239,6 +13359,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -13952,9 +14076,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("varchar(50)") .HasComment("คำนำหน้านาม"); - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - b.Property("RetirementDeceasedId") .HasColumnType("char(36)"); @@ -13962,8 +14083,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.HasIndex("DocumentId"); - b.HasIndex("ReceiveUserId"); - b.HasIndex("RetirementDeceasedId"); b.ToTable("RetirementDeceasedNotis"); @@ -14235,6 +14354,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("datetime(6)") .HasComment("วันที่พ้นจากราชการทหาร"); + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") .HasColumnType("longtext") .HasComment("สังกัดเดิม"); @@ -14251,6 +14374,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -14504,6 +14631,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("หน่วยงานที่ให้ออกไป"); + b.Property("OrganizationOld") + .HasColumnType("longtext") + .HasComment("สังกัดเดิม"); + b.Property("OrganizationPositionOld") .HasColumnType("longtext") .HasComment("สังกัด"); @@ -14516,6 +14647,10 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); + b.Property("PositionOld") + .HasColumnType("longtext") + .HasComment("ตำแหน่งเดิม"); + b.Property("PositionTypeOld") .HasColumnType("longtext") .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); @@ -16662,15 +16797,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("PlacementType"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => { b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") @@ -17115,12 +17241,6 @@ namespace BMA.EHR.Infrastructure.Migrations .WithMany() .HasForeignKey("DocumentId"); - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "ReceiveUser") - .WithMany() - .HasForeignKey("ReceiveUserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") .WithMany("RetirementDeceasedNotis") .HasForeignKey("RetirementDeceasedId") @@ -17129,8 +17249,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("Document"); - b.Navigation("ReceiveUser"); - b.Navigation("RetirementDeceased"); }); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index 767801f2..ca9031c4 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -67,49 +67,72 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin() { - var placementAppointments = await _context.PlacementAppointments.AsQueryable() .Where(x => x.type == "OFFICER") .OrderByDescending(x => x.CreatedAt) .Select(p => new { p.Id, + p.profileId, p.prefix, p.firstName, p.lastName, + p.citizenId, + p.DateOfBirth, p.root, + p.rootId, p.rootShortName, p.child1, + p.child1Id, p.child1ShortName, p.child2, + p.child2Id, p.child2ShortName, p.child3, + p.child3Id, p.child3ShortName, p.child4, + p.child4Id, p.child4ShortName, + p.orgRevisionId, + p.positionId, p.posMasterNo, - p.positionName, - p.posLevelName, + p.position, + p.positionField, + p.posTypeId, p.posTypeName, + p.posLevelId, + p.posLevelName, + node = p.root == null ? (int?)null : (p.child1 == null ? 0 : (p.child2 == null ? 1 : (p.child3 == null ? 2 : (p.child4 == null ? 3 : 4)))), + nodeName = p.root == null ? null : (p.child1 == null ? p.root : (p.child2 == null ? p.child1 : (p.child3 == null ? p.child2 : (p.child4 == null ? p.child3 : p.child4)))), + nodeId = p.rootId == null ? null : (p.child1Id == null ? p.rootId : (p.child2Id == null ? p.child1Id : (p.child3Id == null ? p.child2Id : (p.child4Id == null ? p.child3Id : p.child4Id)))), + nodeShortName = p.rootShortName == null ? null : (p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName)))), p.rootOld, + p.rootOldId, p.rootShortNameOld, p.child1Old, + p.child1OldId, p.child1ShortNameOld, p.child2Old, + p.child2OldId, p.child2ShortNameOld, p.child3Old, + p.child3OldId, p.child3ShortNameOld, p.child4Old, + p.child4OldId, p.child4ShortNameOld, p.posMasterNoOld, - p.positionOld, - p.posLevelNameOld, + p.posTypeOldId, p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, p.Status, p.Amount, p.RecruitDate, + p.ReportingDate, p.IsActive, p.PositionDate, @@ -120,8 +143,12 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.AmountOld, + p.OrganizationOld, + p.posmasterId, + p.PositionOld, p.CreatedAt, - CommandType = p.CommandType == null ? null : p.CommandType.Name, + p.typeCommand, }) .ToListAsync(); // if (PlacementAdmin == true) @@ -149,38 +176,55 @@ namespace BMA.EHR.Placement.Service.Controllers { p.Id, p.profileId, + p.DateOfBirth, p.prefix, p.firstName, p.lastName, p.root, + p.rootId, p.rootShortName, p.child1, + p.child1Id, p.child1ShortName, p.child2, + p.child2Id, p.child2ShortName, p.child3, + p.child3Id, p.child3ShortName, p.child4, + p.child4Id, p.child4ShortName, + p.orgRevisionId, + p.positionId, p.posMasterNo, - p.positionName, - p.posLevelName, + p.position, + p.positionField, + p.posTypeId, p.posTypeName, + p.posLevelId, + p.posLevelName, p.rootOld, + p.rootOldId, p.rootShortNameOld, p.child1Old, + p.child1OldId, p.child1ShortNameOld, p.child2Old, + p.child2OldId, p.child2ShortNameOld, p.child3Old, + p.child3OldId, p.child3ShortNameOld, p.child4Old, + p.child4OldId, p.child4ShortNameOld, p.posMasterNoOld, - p.positionOld, - p.posLevelNameOld, + p.posTypeOldId, p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, p.Status, p.Amount, @@ -195,8 +239,11 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionNumberOld, p.OrganizationPositionOld, p.PositionDate, + p.AmountOld, + p.OrganizationOld, + p.PositionOld, // PlacementAppointmentDocs = p.PlacementAppointmentDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), - CommandType = p.CommandType == null ? null : p.CommandType.Name, + p.typeCommand, }) .FirstOrDefaultAsync(); if (data == null) @@ -212,61 +259,88 @@ namespace BMA.EHR.Placement.Service.Controllers // }; // placementAppointmentDocs.Add(_doc); // } - // var _data = new - // { - // data.Id, - // data.profileId, - // data.prefix, - // data.firstName, - // data.lastName, - // data.root, - // data.rootShortName, - // data.child1, - // data.child1ShortName, - // data.child2, - // data.child2ShortName, - // data.child3, - // data.child3ShortName, - // data.child4, - // data.child4ShortName, - // data.posMasterNo, - // data.positionName, - // data.posLevelName, - // data.posTypeName, + var _data = new + { + data.Id, + data.profileId, + data.prefix, + data.firstName, + data.lastName, + data.DateOfBirth, + data.root, + data.rootShortName, + data.child1, + data.child1Id, + data.child1ShortName, + data.child2, + data.child2Id, + data.child2ShortName, + data.child3, + data.child3Id, + data.child3ShortName, + data.child4, + data.child4Id, + data.child4ShortName, + node = data.root == null ? (int?)null : (data.child1 == null ? 0 : (data.child2 == null ? 1 : (data.child3 == null ? 2 : (data.child4 == null ? 3 : 4)))), + nodeName = data.root == null ? null : (data.child1 == null ? data.root : (data.child2 == null ? data.child1 : (data.child3 == null ? data.child2 : (data.child4 == null ? data.child3 : data.child4)))), + nodeId = data.rootId == null ? null : (data.child1Id == null ? data.rootId : (data.child2Id == null ? data.child1Id : (data.child3Id == null ? data.child2Id : (data.child4Id == null ? data.child3Id : data.child4Id)))), + nodeShortName = data.rootShortName == null ? null : (data.child1ShortName == null ? data.rootShortName : (data.child2ShortName == null ? data.child1ShortName : (data.child3ShortName == null ? data.child2ShortName : (data.child4ShortName == null ? data.child3ShortName : data.child4ShortName)))), + data.orgRevisionId, + data.positionId, + data.posMasterNo, + data.position, + data.positionField, + data.posTypeId, + data.posTypeName, + data.posLevelId, + data.posLevelName, - // data.rootOld, - // data.rootShortNameOld, - // data.child1Old, - // data.child1ShortNameOld, - // data.child2Old, - // data.child2ShortNameOld, - // data.child3Old, - // data.child3ShortNameOld, - // data.child4Old, - // data.child4ShortNameOld, - // data.posMasterNoOld, - // data.positionOld, - // data.posLevelNameOld, - // data.posTypeNameOld, + data.rootOld, + data.rootOldId, + data.rootShortNameOld, + data.child1Old, + data.child1OldId, + data.child1ShortNameOld, + data.child2Old, + data.child2OldId, + data.child2ShortNameOld, + data.child3Old, + data.child3OldId, + data.child3ShortNameOld, + data.child4Old, + data.child4OldId, + data.child4ShortNameOld, + nodeOld = data.rootOld == null ? (int?)null : (data.child1Old == null ? 0 : (data.child2Old == null ? 1 : (data.child3Old == null ? 2 : (data.child4Old == null ? 3 : 4)))), + nodeNameOld = data.rootOld == null ? null : (data.child1Old == null ? data.root : (data.child2Old == null ? data.child1Old : (data.child3Old == null ? data.child2Old : (data.child4Old == null ? data.child3Old : data.child4Old)))), + nodeOldId = data.rootOldId == null ? null : (data.child1OldId == null ? data.rootOldId : (data.child2OldId == null ? data.child1OldId : (data.child3OldId == null ? data.child2OldId : (data.child4OldId == null ? data.child3OldId : data.child4OldId)))), + nodeShortNameOld = data.rootShortNameOld == null ? null : (data.child1ShortNameOld == null ? data.rootShortNameOld : (data.child2ShortNameOld == null ? data.child1ShortNameOld : (data.child3ShortNameOld == null ? data.child2ShortNameOld : (data.child4ShortNameOld == null ? data.child3ShortNameOld : data.child4ShortNameOld)))), + data.posMasterNoOld, + data.posTypeOldId, + data.posTypeNameOld, + data.posLevelOldId, + data.posLevelNameOld, - // data.Status, - // data.Amount, - // data.RecruitDate, + data.Status, + data.Amount, + data.RecruitDate, - // data.CreatedAt, - // data.Reason, - // data.EducationOld, - // data.salary, - // data.PositionTypeOld, - // data.PositionLevelOld, - // data.PositionNumberOld, - // data.OrganizationPositionOld, - // data.PositionDate, - // Docs = placementAppointmentDocs, - // data.CommandType, - // }; + data.CreatedAt, + data.Reason, + data.EducationOld, + data.salary, + data.PositionTypeOld, + data.PositionLevelOld, + data.PositionNumberOld, + data.OrganizationPositionOld, + data.PositionDate, + data.AmountOld, + data.OrganizationOld, + data.PositionOld, + // Docs = placementAppointmentDocs, + data.typeCommand, + }; - return Success(data); + return Success(_data); } /// @@ -329,6 +403,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.firstName = org.result.firstName; placementAppointment.lastName = org.result.lastName; placementAppointment.citizenId = org.result.citizenId; + placementAppointment.DateOfBirth = org.result.birthDate; placementAppointment.rootOld = org.result.root; placementAppointment.rootOldId = org.result.rootId; placementAppointment.rootShortNameOld = org.result.rootShortName; @@ -345,11 +420,24 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.child4OldId = org.result.child4Id; placementAppointment.child4ShortNameOld = org.result.child4ShortName; placementAppointment.posMasterNoOld = org.result.posMasterNo; - placementAppointment.positionOld = org.result.position; placementAppointment.posTypeOldId = org.result.posTypeId; placementAppointment.posTypeNameOld = org.result.posTypeName; placementAppointment.posLevelOldId = org.result.posLevelId; placementAppointment.posLevelNameOld = org.result.posLevelName; + + // placementAppointment.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; + // placementAppointment.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; + + placementAppointment.PositionOld = org.result.position; + placementAppointment.PositionLevelOld = org.result.posLevelName; + placementAppointment.PositionTypeOld = org.result.posTypeName; + placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + placementAppointment.OrganizationPositionOld = org.result.position + "-" + placementAppointment.OrganizationOld; } await _context.PlacementAppointments.AddAsync(placementAppointment); await _context.SaveChangesAsync(); @@ -436,20 +524,21 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName; } + uppdated.typeCommand = req.typeCommand == null ? null : req.typeCommand.Trim().ToUpper(); uppdated.posmasterId = req.posmasterId; uppdated.node = req.node; uppdated.nodeId = req.nodeId; uppdated.orgRevisionId = req.orgRevisionId; uppdated.positionId = req.positionId; uppdated.posMasterNo = req.posMasterNo; - uppdated.positionName = req.positionName; + uppdated.position = req.position; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; uppdated.posLevelId = req.posLevelId; uppdated.posLevelName = req.posLevelName; uppdated.Amount = req.Amount; - uppdated.RecruitDate = req.RecruitDate; + uppdated.ReportingDate = req.reportingDate; uppdated.Status = "PENDING"; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; @@ -559,7 +648,7 @@ namespace BMA.EHR.Placement.Service.Controllers if (uppdated == null) continue; - uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId); + // uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId); uppdated.Status = "REPORT"; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs index 8f0241ef..c21608b6 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs @@ -67,49 +67,72 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin() { - var placementAppointments = await _context.PlacementAppointments.AsQueryable() .Where(x => x.type == "EMPLOYEE") .OrderByDescending(x => x.CreatedAt) .Select(p => new { p.Id, + p.profileId, p.prefix, p.firstName, p.lastName, + p.citizenId, + p.DateOfBirth, p.root, + p.rootId, p.rootShortName, p.child1, + p.child1Id, p.child1ShortName, p.child2, + p.child2Id, p.child2ShortName, p.child3, + p.child3Id, p.child3ShortName, p.child4, + p.child4Id, p.child4ShortName, + p.orgRevisionId, + p.positionId, p.posMasterNo, - p.positionName, - p.posLevelName, + p.position, + p.positionField, + p.posTypeId, p.posTypeName, + p.posLevelId, + p.posLevelName, + node = p.root == null ? (int?)null : (p.child1 == null ? 0 : (p.child2 == null ? 1 : (p.child3 == null ? 2 : (p.child4 == null ? 3 : 4)))), + nodeName = p.root == null ? null : (p.child1 == null ? p.root : (p.child2 == null ? p.child1 : (p.child3 == null ? p.child2 : (p.child4 == null ? p.child3 : p.child4)))), + nodeId = p.rootId == null ? null : (p.child1Id == null ? p.rootId : (p.child2Id == null ? p.child1Id : (p.child3Id == null ? p.child2Id : (p.child4Id == null ? p.child3Id : p.child4Id)))), + nodeShortName = p.rootShortName == null ? null : (p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName)))), p.rootOld, + p.rootOldId, p.rootShortNameOld, p.child1Old, + p.child1OldId, p.child1ShortNameOld, p.child2Old, + p.child2OldId, p.child2ShortNameOld, p.child3Old, + p.child3OldId, p.child3ShortNameOld, p.child4Old, + p.child4OldId, p.child4ShortNameOld, p.posMasterNoOld, - p.positionOld, - p.posLevelNameOld, + p.posTypeOldId, p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, p.Status, p.Amount, p.RecruitDate, + p.ReportingDate, p.IsActive, p.PositionDate, @@ -120,8 +143,12 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.AmountOld, + p.OrganizationOld, + p.posmasterId, + p.PositionOld, p.CreatedAt, - CommandType = p.CommandType == null ? null : p.CommandType.Name, + p.typeCommand, }) .ToListAsync(); @@ -150,35 +177,52 @@ namespace BMA.EHR.Placement.Service.Controllers p.prefix, p.firstName, p.lastName, + p.DateOfBirth, p.root, + p.rootId, p.rootShortName, p.child1, + p.child1Id, p.child1ShortName, p.child2, + p.child2Id, p.child2ShortName, p.child3, + p.child3Id, p.child3ShortName, p.child4, + p.child4Id, p.child4ShortName, + p.orgRevisionId, + p.positionId, p.posMasterNo, - p.positionName, - p.posLevelName, + p.position, + p.positionField, + p.posTypeId, p.posTypeName, + p.posLevelId, + p.posLevelName, p.rootOld, + p.rootOldId, p.rootShortNameOld, p.child1Old, + p.child1OldId, p.child1ShortNameOld, p.child2Old, + p.child2OldId, p.child2ShortNameOld, p.child3Old, + p.child3OldId, p.child3ShortNameOld, p.child4Old, + p.child4OldId, p.child4ShortNameOld, p.posMasterNoOld, - p.positionOld, - p.posLevelNameOld, + p.posTypeOldId, p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, p.Status, p.Amount, @@ -193,8 +237,11 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionNumberOld, p.OrganizationPositionOld, p.PositionDate, + p.AmountOld, + p.OrganizationOld, + p.PositionOld, // PlacementAppointmentDocs = p.PlacementAppointmentDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), - CommandType = p.CommandType == null ? null : p.CommandType.Name, + p.typeCommand, }) .FirstOrDefaultAsync(); if (data == null) @@ -210,61 +257,88 @@ namespace BMA.EHR.Placement.Service.Controllers // }; // placementAppointmentDocs.Add(_doc); // } - // var _data = new - // { - // data.Id, - // data.profileId, - // data.prefix, - // data.firstName, - // data.lastName, - // data.root, - // data.rootShortName, - // data.child1, - // data.child1ShortName, - // data.child2, - // data.child2ShortName, - // data.child3, - // data.child3ShortName, - // data.child4, - // data.child4ShortName, - // data.posMasterNo, - // data.positionName, - // data.posLevelName, - // data.posTypeName, + var _data = new + { + data.Id, + data.profileId, + data.prefix, + data.firstName, + data.lastName, + data.DateOfBirth, + data.root, + data.rootShortName, + data.child1, + data.child1Id, + data.child1ShortName, + data.child2, + data.child2Id, + data.child2ShortName, + data.child3, + data.child3Id, + data.child3ShortName, + data.child4, + data.child4Id, + data.child4ShortName, + node = data.root == null ? (int?)null : (data.child1 == null ? 0 : (data.child2 == null ? 1 : (data.child3 == null ? 2 : (data.child4 == null ? 3 : 4)))), + nodeName = data.root == null ? null : (data.child1 == null ? data.root : (data.child2 == null ? data.child1 : (data.child3 == null ? data.child2 : (data.child4 == null ? data.child3 : data.child4)))), + nodeId = data.rootId == null ? null : (data.child1Id == null ? data.rootId : (data.child2Id == null ? data.child1Id : (data.child3Id == null ? data.child2Id : (data.child4Id == null ? data.child3Id : data.child4Id)))), + nodeShortName = data.rootShortName == null ? null : (data.child1ShortName == null ? data.rootShortName : (data.child2ShortName == null ? data.child1ShortName : (data.child3ShortName == null ? data.child2ShortName : (data.child4ShortName == null ? data.child3ShortName : data.child4ShortName)))), + data.orgRevisionId, + data.positionId, + data.posMasterNo, + data.position, + data.positionField, + data.posTypeId, + data.posTypeName, + data.posLevelId, + data.posLevelName, - // data.rootOld, - // data.rootShortNameOld, - // data.child1Old, - // data.child1ShortNameOld, - // data.child2Old, - // data.child2ShortNameOld, - // data.child3Old, - // data.child3ShortNameOld, - // data.child4Old, - // data.child4ShortNameOld, - // data.posMasterNoOld, - // data.positionOld, - // data.posLevelNameOld, - // data.posTypeNameOld, + data.rootOld, + data.rootOldId, + data.rootShortNameOld, + data.child1Old, + data.child1OldId, + data.child1ShortNameOld, + data.child2Old, + data.child2OldId, + data.child2ShortNameOld, + data.child3Old, + data.child3OldId, + data.child3ShortNameOld, + data.child4Old, + data.child4OldId, + data.child4ShortNameOld, + nodeOld = data.rootOld == null ? (int?)null : (data.child1Old == null ? 0 : (data.child2Old == null ? 1 : (data.child3Old == null ? 2 : (data.child4Old == null ? 3 : 4)))), + nodeNameOld = data.rootOld == null ? null : (data.child1Old == null ? data.root : (data.child2Old == null ? data.child1Old : (data.child3Old == null ? data.child2Old : (data.child4Old == null ? data.child3Old : data.child4Old)))), + nodeOldId = data.rootOldId == null ? null : (data.child1OldId == null ? data.rootOldId : (data.child2OldId == null ? data.child1OldId : (data.child3OldId == null ? data.child2OldId : (data.child4OldId == null ? data.child3OldId : data.child4OldId)))), + nodeShortNameOld = data.rootShortNameOld == null ? null : (data.child1ShortNameOld == null ? data.rootShortNameOld : (data.child2ShortNameOld == null ? data.child1ShortNameOld : (data.child3ShortNameOld == null ? data.child2ShortNameOld : (data.child4ShortNameOld == null ? data.child3ShortNameOld : data.child4ShortNameOld)))), + data.posMasterNoOld, + data.posTypeOldId, + data.posTypeNameOld, + data.posLevelOldId, + data.posLevelNameOld, - // data.Status, - // data.Amount, - // data.RecruitDate, + data.Status, + data.Amount, + data.RecruitDate, - // data.CreatedAt, - // data.Reason, - // data.EducationOld, - // data.salary, - // data.PositionTypeOld, - // data.PositionLevelOld, - // data.PositionNumberOld, - // data.OrganizationPositionOld, - // data.PositionDate, - // Docs = placementAppointmentDocs, - // data.CommandType, - // }; + data.CreatedAt, + data.Reason, + data.EducationOld, + data.salary, + data.PositionTypeOld, + data.PositionLevelOld, + data.PositionNumberOld, + data.OrganizationPositionOld, + data.PositionDate, + data.AmountOld, + data.OrganizationOld, + data.PositionOld, + // Docs = placementAppointmentDocs, + data.typeCommand, + }; - return Success(data); + return Success(_data); } /// @@ -327,6 +401,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.firstName = org.result.firstName; placementAppointment.lastName = org.result.lastName; placementAppointment.citizenId = org.result.citizenId; + placementAppointment.DateOfBirth = org.result.birthDate; placementAppointment.rootOld = org.result.root; placementAppointment.rootOldId = org.result.rootId; placementAppointment.rootShortNameOld = org.result.rootShortName; @@ -343,11 +418,24 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.child4OldId = org.result.child4Id; placementAppointment.child4ShortNameOld = org.result.child4ShortName; placementAppointment.posMasterNoOld = org.result.posMasterNo; - placementAppointment.positionOld = org.result.position; placementAppointment.posTypeOldId = org.result.posTypeId; placementAppointment.posTypeNameOld = org.result.posTypeName; placementAppointment.posLevelOldId = org.result.posLevelId; placementAppointment.posLevelNameOld = org.result.posLevelName; + + // placementAppointment.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; + // placementAppointment.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; + + placementAppointment.PositionOld = org.result.position; + placementAppointment.PositionLevelOld = org.result.posLevelName; + placementAppointment.PositionTypeOld = org.result.posTypeName; + placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + placementAppointment.OrganizationPositionOld = org.result.position + "-" + placementAppointment.OrganizationOld; } await _context.PlacementAppointments.AddAsync(placementAppointment); await _context.SaveChangesAsync(); @@ -434,13 +522,14 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName; } + uppdated.typeCommand = req.typeCommand == null ? null : req.typeCommand.Trim().ToUpper(); uppdated.posmasterId = req.posmasterId; uppdated.node = req.node; uppdated.nodeId = req.nodeId; uppdated.orgRevisionId = req.orgRevisionId; uppdated.positionId = req.positionId; uppdated.posMasterNo = req.posMasterNo; - uppdated.positionName = req.positionName; + uppdated.position = req.position; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; @@ -448,6 +537,7 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.posLevelName = req.posLevelName; uppdated.Amount = req.Amount; uppdated.RecruitDate = req.RecruitDate; + uppdated.ReportingDate = req.reportingDate; uppdated.Status = "PENDING"; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; @@ -546,7 +636,7 @@ namespace BMA.EHR.Placement.Service.Controllers if (uppdated == null) continue; - uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId); + // uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId); uppdated.Status = "REPORT"; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index 458c70b0..ff0c505e 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -170,6 +170,8 @@ namespace BMA.EHR.Placement.Service.Controllers p.DateEnd, p.Organization, p.OrganizationPositionOld, + p.PositionOld, + p.OrganizationOld, p.IsActive, }) .FirstOrDefaultAsync(); @@ -241,6 +243,17 @@ namespace BMA.EHR.Placement.Service.Controllers placementOfficer.posTypeName = org.result.posTypeName; placementOfficer.posLevelId = org.result.posLevelId; placementOfficer.posLevelName = org.result.posLevelName; + + placementOfficer.PositionOld = org.result.position; + placementOfficer.PositionLevelOld = org.result.posLevelName; + placementOfficer.PositionTypeOld = org.result.posTypeName; + placementOfficer.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + placementOfficer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + placementOfficer.OrganizationPositionOld = org.result.position + "-" + placementOfficer.OrganizationOld; } await _context.PlacementOfficers.AddAsync(placementOfficer); await _context.SaveChangesAsync(); @@ -265,6 +278,7 @@ namespace BMA.EHR.Placement.Service.Controllers return Error(GlobalMessages.PlacementOfficerNotFound, 404); uppdated.PositionNumberOld = req.PositionNumberOld; + uppdated.PositionOld = req.PositionOld; uppdated.OrganizationPositionOld = req.OrganizationPositionOld; uppdated.PositionLevelOld = req.PositionLevelOld; uppdated.PositionTypeOld = req.PositionTypeOld; diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 0d3343c9..d59e98df 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -67,84 +67,105 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin() { - var rootId = ""; - var child1Id = ""; - var child2Id = ""; - var child3Id = ""; - var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); + // var rootId = ""; + // var child1Id = ""; + // var child2Id = ""; + // var child3Id = ""; + // var child4Id = ""; + // var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + // using (var client = new HttpClient()) + // { + // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + // var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + // var _res = await client.SendAsync(_req); + // var _result = await _res.Content.ReadAsStringAsync(); - var org = JsonConvert.DeserializeObject(_result); + // var org = JsonConvert.DeserializeObject(_result); - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - rootId = org.result.rootId == null ? "" : org.result.rootId; - child1Id = org.result.child1Id == null ? "" : org.result.child1Id; - child2Id = org.result.child2Id == null ? "" : org.result.child2Id; - child3Id = org.result.child3Id == null ? "" : org.result.child3Id; - child4Id = org.result.child4Id == null ? "" : org.result.child4Id; + // if (org == null || org.result == null) + // return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); + // rootId = org.result.rootId == null ? "" : org.result.rootId; + // child1Id = org.result.child1Id == null ? "" : org.result.child1Id; + // child2Id = org.result.child2Id == null ? "" : org.result.child2Id; + // child3Id = org.result.child3Id == null ? "" : org.result.child3Id; + // child4Id = org.result.child4Id == null ? "" : org.result.child4Id; - var placementReceives = await _context.PlacementReceives.AsQueryable() + var placementReceives = await _context.PlacementReceives.AsQueryable() .OrderByDescending(x => x.CreatedAt) - .Where(x => PlacementAdmin == true ? true : (rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id)))))) - .Select(p => new - { - p.Id, - p.citizenId, - p.prefix, - p.firstName, - p.lastName, - p.DateOfBirth, - Gender = p.Gender == null ? null : p.Gender.Name, - p.Status, - p.Amount, - p.RecruitDate, - p.root, - p.rootId, - p.rootShortName, - p.child1, - p.child1Id, - p.child1ShortName, - p.child2, - p.child2Id, - p.child2ShortName, - p.child3, - p.child3Id, - p.child3ShortName, - p.child4, - p.child4Id, - p.child4ShortName, - p.orgRevisionId, - p.positionId, - p.posMasterNo, - p.positionName, - p.positionField, - p.posTypeId, - p.posTypeName, - p.posLevelId, - p.posLevelName, - p.IsActive, - p.Reason, - p.EducationOld, - p.AmountOld, - p.PositionTypeOld, - p.PositionLevelOld, - p.PositionNumberOld, - p.OrganizationPositionOld, - p.CreatedAt, - }) - .ToListAsync(); - // if (PlacementAdmin == true) - // placementReceives.Where(x => x.Status.Trim().ToUpper().Contains("PENDING")); + // .Where(x => PlacementAdmin == true ? true : (rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id)))))) + .Select(p => new + { + p.Id, + p.prefix, + p.firstName, + p.lastName, + p.citizenId, + p.Status, + p.RecruitDate, + p.root, + p.rootId, + p.rootShortName, + p.child1, + p.child1Id, + p.child1ShortName, + p.child2, + p.child2Id, + p.child2ShortName, + p.child3, + p.child3Id, + p.child3ShortName, + p.child4, + p.child4Id, + p.child4ShortName, + p.orgRevisionId, + p.positionId, + p.posMasterNo, + p.position, + p.positionField, + p.posTypeId, + p.posTypeName, + p.posLevelId, + p.posLevelName, - return Success(placementReceives); - } + p.IsActive, + p.Reason, + p.EducationOld, + p.AmountOld, + p.PositionTypeOld, + p.PositionLevelOld, + p.PositionNumberOld, + p.OrganizationPositionOld, + p.OrganizationOld, + + p.rootOld, + p.rootOldId, + p.rootShortNameOld, + p.child1Old, + p.child1OldId, + p.child1ShortNameOld, + p.child2Old, + p.child2OldId, + p.child2ShortNameOld, + p.child3Old, + p.child3OldId, + p.child3ShortNameOld, + p.child4Old, + p.child4OldId, + p.child4ShortNameOld, + p.posMasterNoOld, + p.positionOld, + p.posTypeOldId, + p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, + p.CreatedAt, + }) + .ToListAsync(); + // if (PlacementAdmin == true) + // placementReceives.Where(x => x.Status.Trim().ToUpper().Contains("PENDING")); + + return Success(placementReceives); + // } } /// @@ -198,20 +219,46 @@ namespace BMA.EHR.Placement.Service.Controllers p.orgRevisionId, p.positionId, p.posMasterNo, - p.positionName, + p.position, p.positionField, p.posTypeId, p.posTypeName, p.posLevelId, p.posLevelName, + p.CreatedAt, p.Reason, p.EducationOld, p.AmountOld, + p.PositionOld, + p.OrganizationOld, p.PositionTypeOld, p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.IsActive, + + p.rootOld, + p.rootOldId, + p.rootShortNameOld, + p.child1Old, + p.child1OldId, + p.child1ShortNameOld, + p.child2Old, + p.child2OldId, + p.child2ShortNameOld, + p.child3Old, + p.child3OldId, + p.child3ShortNameOld, + p.child4Old, + p.child4OldId, + p.child4ShortNameOld, + p.posMasterNoOld, + p.posTypeOldId, + p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, + // Avatar = p.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Avatar.Id, PlacementReceiveDocs = p.PlacementReceiveDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) @@ -263,23 +310,53 @@ namespace BMA.EHR.Placement.Service.Controllers data.child4, data.child4Id, data.child4ShortName, + node = data.root == null ? (int?)null : (data.child1 == null ? 0 : (data.child2 == null ? 1 : (data.child3 == null ? 2 : (data.child4 == null ? 3 : 4)))), + nodeName = data.root == null ? null : (data.child1 == null ? data.root : (data.child2 == null ? data.child1 : (data.child3 == null ? data.child2 : (data.child4 == null ? data.child3 : data.child4)))), + nodeId = data.rootId == null ? null : (data.child1Id == null ? data.rootId : (data.child2Id == null ? data.child1Id : (data.child3Id == null ? data.child2Id : (data.child4Id == null ? data.child3Id : data.child4Id)))), + nodeShortName = data.rootShortName == null ? null : (data.child1ShortName == null ? data.rootShortName : (data.child2ShortName == null ? data.child1ShortName : (data.child3ShortName == null ? data.child2ShortName : (data.child4ShortName == null ? data.child3ShortName : data.child4ShortName)))), data.orgRevisionId, data.positionId, data.posMasterNo, - data.positionName, + data.position, data.positionField, data.posTypeId, data.posTypeName, data.posLevelId, data.posLevelName, + data.CreatedAt, data.Reason, data.EducationOld, data.AmountOld, + data.PositionOld, + data.OrganizationOld, data.PositionTypeOld, data.PositionLevelOld, data.PositionNumberOld, data.OrganizationPositionOld, + data.IsActive, + + data.rootOld, + data.rootOldId, + data.rootShortNameOld, + data.child1Old, + data.child1OldId, + data.child1ShortNameOld, + data.child2Old, + data.child2OldId, + data.child2ShortNameOld, + data.child3Old, + data.child3OldId, + data.child3ShortNameOld, + data.child4Old, + data.child4OldId, + data.child4ShortNameOld, + data.posMasterNoOld, + data.posTypeOldId, + data.posTypeNameOld, + data.posLevelOldId, + data.posLevelNameOld, + // Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar), Docs = placementReceiveDocs, }; @@ -321,24 +398,60 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - // var profile = await _context.Profiles - // .Include(x => x.PositionLevel) - // .Include(x => x.PositionType) - // .Include(x => x.PosNo) - // .Include(x => x.Salaries) - // .Include(x => x.Educations) - // .Include(x => x.Position) - // .FirstOrDefaultAsync(x => x.CitizenId == req.CitizenId); - // if (profile != null) - // { - // placementReceive.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; - // placementReceive.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; - // placementReceive.PositionLevelOld = profile.PositionLevel == null ? null : profile.PositionLevel.Name; - // placementReceive.PositionTypeOld = profile.PositionType == null ? null : profile.PositionType.Name; - // placementReceive.PositionNumberOld = profile.PosNo == null ? null : profile.PosNo.Name; - // placementReceive.OrganizationPositionOld = profile.Position == null ? profile.Oc : $"{profile.Position.Name}-{profile.Oc}"; - // } + var apiUrl = $"{_configuration["API"]}org/profile/citizenid/position/{req.citizenId}"; + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + var _res = await client.SendAsync(_req); + var _result = await _res.Content.ReadAsStringAsync(); + + var org = JsonConvert.DeserializeObject(_result); + + if (org != null && org.result != null) + { + placementReceive.profileId = org.result.profileId; + placementReceive.prefix = org.result.prefix; + placementReceive.firstName = org.result.firstName; + placementReceive.lastName = org.result.lastName; + placementReceive.citizenId = org.result.citizenId; + placementReceive.rootOld = org.result.root; + placementReceive.rootOldId = org.result.rootId; + placementReceive.rootShortNameOld = org.result.rootShortName; + placementReceive.child1Old = org.result.child1; + placementReceive.child1OldId = org.result.child1Id; + placementReceive.child1ShortNameOld = org.result.child1ShortName; + placementReceive.child2Old = org.result.child2; + placementReceive.child2OldId = org.result.child2Id; + placementReceive.child2ShortNameOld = org.result.child2ShortName; + placementReceive.child3Old = org.result.child3; + placementReceive.child3OldId = org.result.child3Id; + placementReceive.child3ShortNameOld = org.result.child3ShortName; + placementReceive.child4Old = org.result.child4; + placementReceive.child4OldId = org.result.child4Id; + placementReceive.child4ShortNameOld = org.result.child4ShortName; + placementReceive.posMasterNoOld = org.result.posMasterNo; + placementReceive.posTypeOldId = org.result.posTypeId; + placementReceive.posTypeNameOld = org.result.posTypeName; + placementReceive.posLevelOldId = org.result.posLevelId; + placementReceive.posLevelNameOld = org.result.posLevelName; + + // placementReceive.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; + // placementReceive.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; + + placementReceive.PositionOld = org.result.position; + placementReceive.PositionLevelOld = org.result.posLevelName; + placementReceive.PositionTypeOld = org.result.posTypeName; + placementReceive.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + placementReceive.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + placementReceive.OrganizationPositionOld = org.result.position + "-" + placementReceive.OrganizationOld; + } + } await _context.PlacementReceives.AddAsync(placementReceive); await _context.SaveChangesAsync(); if (Request.Form.Files != null && Request.Form.Files.Count != 0) @@ -478,7 +591,7 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.orgRevisionId = req.orgRevisionId; uppdated.positionId = req.positionId; uppdated.posMasterNo = req.posMasterNo; - uppdated.positionName = req.positionName; + uppdated.position = req.position; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs index 8f82f394..c4a8ee7b 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs @@ -178,6 +178,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.PositionOld, p.DateRepatriation, }) .FirstOrDefaultAsync(); @@ -249,6 +250,17 @@ namespace BMA.EHR.Placement.Service.Controllers placementRepatriation.posTypeName = org.result.posTypeName; placementRepatriation.posLevelId = org.result.posLevelId; placementRepatriation.posLevelName = org.result.posLevelName; + + placementRepatriation.PositionOld = org.result.position; + placementRepatriation.PositionLevelOld = org.result.posLevelName; + placementRepatriation.PositionTypeOld = org.result.posTypeName; + placementRepatriation.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + placementRepatriation.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + placementRepatriation.OrganizationPositionOld = org.result.position + "-" + placementRepatriation.OrganizationOld; } await _context.PlacementRepatriations.AddAsync(placementRepatriation); await _context.SaveChangesAsync(); diff --git a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs index 6866a36a..43a704ac 100644 --- a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs @@ -14,6 +14,7 @@ namespace BMA.EHR.Placement.Service.Requests public string? firstName { get; set; } public string? lastName { get; set; } public string? citizenId { get; set; } + public DateTime? birthDate { get; set; } public string? root { get; set; } public string? rootId { get; set; } public string? rootShortName { get; set; } @@ -29,6 +30,9 @@ namespace BMA.EHR.Placement.Service.Requests public string? child4 { get; set; } public string? child4Id { get; set; } public string? child4ShortName { get; set; } + public string? node { get; set; } + public string? nodeId { get; set; } + public string? nodeShortName { get; set; } public int? posMasterNo { get; set; } public string? position { get; set; } public string? posTypeId { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentEmployeeRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentEmployeeRequest.cs index d79f4467..9d1e9e0e 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentEmployeeRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentEmployeeRequest.cs @@ -22,7 +22,7 @@ namespace BMA.EHR.Placement.Service.Requests public string? orgRevisionId { get; set; } public int? posMasterNo { get; set; } public string? positionId { get; set; } - public string? positionName { get; set; } + public string? position { get; set; } public string? positionField { get; set; } public string? posTypeId { get; set; } public string? posTypeName { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs index 21bdc0f5..6943d6a2 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs @@ -22,7 +22,7 @@ namespace BMA.EHR.Placement.Service.Requests public string? orgRevisionId { get; set; } public int? posMasterNo { get; set; } public string? positionId { get; set; } - public string? positionName { get; set; } + public string? position { get; set; } public string? positionField { get; set; } public string? posTypeId { get; set; } public string? posTypeName { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs index 198faba7..21b8d235 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs @@ -22,7 +22,7 @@ namespace BMA.EHR.Placement.Service.Requests public string? orgRevisionId { get; set; } public int? posMasterNo { get; set; } public string? positionId { get; set; } - public string? positionName { get; set; } + public string? position { get; set; } public string? positionField { get; set; } public string? posTypeId { get; set; } public string? posTypeName { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementAppointmentEditRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementAppointmentEditRequest.cs index 2a164e6b..8ec18f9d 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementAppointmentEditRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementAppointmentEditRequest.cs @@ -5,18 +5,18 @@ namespace BMA.EHR.Placement.Service.Requests { public class PlacementAppointmentEditRequest { - public string CitizenId { get; set; } - public Guid PrefixId { get; set; } - public string Firstname { get; set; } - public string Lastname { get; set; } - public DateTime DateOfBirth { get; set; } - public Guid? GenderId { get; set; } - public string? Nationality { get; set; } - public string? Race { get; set; } - public Guid? ReligionId { get; set; } - public Guid? BloodGroupId { get; set; } - public Guid? RelationshipId { get; set; } - public string? TelephoneNumber { get; set; } + // public string CitizenId { get; set; } + // public Guid PrefixId { get; set; } + // public string Firstname { get; set; } + // public string Lastname { get; set; } + // public DateTime DateOfBirth { get; set; } + // public Guid? GenderId { get; set; } + // public string? Nationality { get; set; } + // public string? Race { get; set; } + // public Guid? ReligionId { get; set; } + // public Guid? BloodGroupId { get; set; } + // public Guid? RelationshipId { get; set; } + // public string? TelephoneNumber { get; set; } public string? Reason { get; set; } public string? EducationOld { get; set; } public string? OrganizationPositionOld { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementOfficerEditRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementOfficerEditRequest.cs index f9379dac..6d9927e7 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementOfficerEditRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementOfficerEditRequest.cs @@ -8,6 +8,7 @@ namespace BMA.EHR.Placement.Service.Requests public string Organization { get; set; } public string Reason { get; set; } public string? OrganizationPositionOld { get; set; } + public string? PositionOld { get; set; } public DateTime? DateStart { get; set; } public DateTime? DateEnd { get; set; } public string? PositionTypeOld { get; set; } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs index 09e50981..00ba35d8 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs @@ -392,7 +392,7 @@ namespace BMA.EHR.Retirement.Service.Controllers IsSendInbox = true, IsSendNotification = true, // OrganizationName = retirementDeceased.OrganizationName, - // PositionName = retirementDeceased.PositionName, + PositionName = retirementDeceased.position, // ReceiveUser = profile, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -502,7 +502,7 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsSendNotification, p.OrganizationName, p.PositionName, - ProfileId = p.ReceiveUser.Id, + // ProfileId = p.ReceiveUser.Id, }) .ToListAsync(); @@ -547,7 +547,7 @@ namespace BMA.EHR.Retirement.Service.Controllers IsSendNotification = item.IsSendNotification, OrganizationName = profile.OrganizationOrganization == null ? "" : profile.OrganizationOrganization, PositionName = profile.Position == null ? null : profile.Position.Name, - ReceiveUser = profile, + // ReceiveUser = profile, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", CreatedAt = DateTime.Now, @@ -595,7 +595,7 @@ namespace BMA.EHR.Retirement.Service.Controllers public async Task> NotiDeceased([FromBody] RetirementDeceasedAddNotiPersonRequest req, Guid id) { var items = await _context.RetirementDeceasedNotis.AsQueryable() - .Include(x => x.ReceiveUser) + // .Include(x => x.ReceiveUser) .Include(x => x.RetirementDeceased) // .ThenInclude(x => x.Profile) // .ThenInclude(x => x.Prefix) @@ -625,36 +625,36 @@ namespace BMA.EHR.Retirement.Service.Controllers }; var payload_str = JsonConvert.SerializeObject(payload); - foreach (var item in items) - { - var prefix = item.RetirementDeceased.prefix; - var profile = req.Persons.FirstOrDefault(x => x.ProfileId == item.ReceiveUser.Id); - if (profile != null) - { - await _repositoryNoti.PushNotificationAsync( - item.ReceiveUser.Id, - $"หนังสือเวียนถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", - $"แจ้งข่าวการถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", - payload_str, - profile.IsSendInbox, - profile.IsSendMail - ); - item.IsSendMail = profile.IsSendMail; - item.IsSendInbox = profile.IsSendInbox; - item.IsSendNotification = profile.IsSendNotification; - } - else - { - await _repositoryNoti.PushNotificationAsync( - item.ReceiveUser.Id, - $"หนังสือเวียนถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", - $"แจ้งข่าวการถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", - payload_str, - item.IsSendInbox, - item.IsSendMail - ); - } - } + // foreach (var item in items) + // { + // var prefix = item.RetirementDeceased.prefix; + // var profile = req.Persons.FirstOrDefault(x => x.ProfileId == item.ReceiveUser.Id); + // if (profile != null) + // { + // await _repositoryNoti.PushNotificationAsync( + // item.ReceiveUser.Id, + // $"หนังสือเวียนถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + // $"แจ้งข่าวการถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + // payload_str, + // profile.IsSendInbox, + // profile.IsSendMail + // ); + // item.IsSendMail = profile.IsSendMail; + // item.IsSendInbox = profile.IsSendInbox; + // item.IsSendNotification = profile.IsSendNotification; + // } + // else + // { + // await _repositoryNoti.PushNotificationAsync( + // item.ReceiveUser.Id, + // $"หนังสือเวียนถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + // $"แจ้งข่าวการถึงแก่กรรมของ {prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + // payload_str, + // item.IsSendInbox, + // item.IsSendMail + // ); + // } + // } await _context.SaveChangesAsync(); return Success(); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 6327e863..81d4ebd9 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -178,6 +178,8 @@ namespace BMA.EHR.Retirement.Service.Controllers p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.PositionOld, + p.OrganizationOld, p.PositionDate, // Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id, // RetirementOtherDocs = p.RetirementOtherDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), @@ -328,6 +330,17 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOther.posTypeName = org.result.posTypeName; retirementOther.posLevelId = org.result.posLevelId; retirementOther.posLevelName = org.result.posLevelName; + + retirementOther.PositionOld = org.result.position; + retirementOther.PositionLevelOld = org.result.posLevelName; + retirementOther.PositionTypeOld = org.result.posTypeName; + retirementOther.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + retirementOther.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + retirementOther.OrganizationPositionOld = org.result.position + "-" + retirementOther.OrganizationOld; } await _context.RetirementOthers.AddAsync(retirementOther); await _context.SaveChangesAsync(); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index bb50ffa5..19947f94 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -177,6 +177,8 @@ namespace BMA.EHR.Retirement.Service.Controllers p.PositionLevelOld, p.PositionNumberOld, p.OrganizationPositionOld, + p.PositionOld, + p.OrganizationOld, // Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id, }) .FirstOrDefaultAsync(); @@ -289,6 +291,17 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOut.posTypeName = org.result.posTypeName; retirementOut.posLevelId = org.result.posLevelId; retirementOut.posLevelName = org.result.posLevelName; + + retirementOut.PositionOld = org.result.position; + retirementOut.PositionLevelOld = org.result.posLevelName; + retirementOut.PositionTypeOld = org.result.posTypeName; + retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") + + (org.result.child3 == null ? "" : org.result.child3 + "/") + + (org.result.child2 == null ? "" : org.result.child2 + "/") + + (org.result.child1 == null ? "" : org.result.child1 + "/") + + (org.result.root == null ? "" : org.result.root + "/"); + retirementOut.OrganizationPositionOld = org.result.position + "-" + retirementOut.OrganizationOld; } await _context.RetirementOuts.AddAsync(retirementOut); await _context.SaveChangesAsync(); diff --git a/BMA.EHR.Retirement.Service/Program.cs b/BMA.EHR.Retirement.Service/Program.cs index e895d5b9..d2f411ad 100644 --- a/BMA.EHR.Retirement.Service/Program.cs +++ b/BMA.EHR.Retirement.Service/Program.cs @@ -160,9 +160,9 @@ var app = builder.Build(); var manager = new RecurringJobManager(); if (manager != null) { - manager.AddOrUpdate("แจ้งเตือนระบบปลดออก", Job.FromExpression(x => x.NotifyDischarge()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - manager.AddOrUpdate("แจ้งเตือนระบบไล่ออก", Job.FromExpression(x => x.NotifyExpulsion()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - manager.AddOrUpdate("แจ้งเตือนระบบให้ออก", Job.FromExpression(x => x.NotifyOut()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); + //manager.AddOrUpdate("แจ้งเตือนระบบปลดออก", Job.FromExpression(x => x.NotifyDischarge()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); + //manager.AddOrUpdate("แจ้งเตือนระบบไล่ออก", Job.FromExpression(x => x.NotifyExpulsion()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); + //manager.AddOrUpdate("แจ้งเตือนระบบให้ออก", Job.FromExpression(x => x.NotifyOut()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); } // apply migrations diff --git a/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs b/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs index 240f9a8d..05c3704e 100644 --- a/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs @@ -29,6 +29,9 @@ namespace BMA.EHR.Retirement.Service.Requests public string? child4 { get; set; } public string? child4Id { get; set; } public string? child4ShortName { get; set; } + public string? node { get; set; } + public string? nodeId { get; set; } + public string? nodeShortName { get; set; } public int? posMasterNo { get; set; } public string? position { get; set; } public string? posTypeId { get; set; } diff --git a/BMA.EHR.Retirement.Service/appsettings.json b/BMA.EHR.Retirement.Service/appsettings.json index 95a20137..666a2028 100644 --- a/BMA.EHR.Retirement.Service/appsettings.json +++ b/BMA.EHR.Retirement.Service/appsettings.json @@ -15,7 +15,7 @@ "ConnectionStrings": { //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", // "DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - "DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" }, "Jwt": { "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", @@ -33,6 +33,6 @@ "BucketName": "bma-recruit" }, "Protocol": "HTTPS", - "API": "https://bma-ehr.frappet.synology.me/api/v1", + "API": "https://bma-ehr.frappet.synology.me/api/v1/", "APIV2": "https://bma-ehr.frappet.synology.me/api/v2" } \ No newline at end of file