diff --git a/BMA.EHR.Domain/Models/Placement/Placement.cs b/BMA.EHR.Domain/Models/Placement/Placement.cs
new file mode 100644
index 00000000..6da4609e
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/Placement.cs
@@ -0,0 +1,27 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class Placement : EntityBase
+ {
+ [Required, Comment("รอบการสอบ")]
+ public string Name { get; set; } = string.Empty;
+ [Comment("ครั้งที่")]
+ public string Round { get; set; } = string.Empty;
+ [Required, Comment("ปีงบประมาณ"), MaxLength(5)]
+ public int Year { get; set; }
+ [Required, Comment("จำนวนผู้สอบได้"), MaxLength(10)]
+ public int Number { get; set; } = 0;
+ [Required, Comment("ประเภทการสอบ")]
+ public string TypeExam { get; set; } = string.Empty;
+ [Required, Comment("วันที่เริ่มบัญชีบัญชี")]
+ public DateTime StartDate { get; set; }
+ [Required, Comment("วันที่สิ้นสุดบัญชี")]
+ public DateTime EndDate { get; set; }
+
+ [Comment("สถานะการใช้งาน")]
+ public bool IsActive { get; set; } = true;
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementCareer.cs b/BMA.EHR.Domain/Models/Placement/PlacementCareer.cs
new file mode 100644
index 00000000..a689c7c6
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/PlacementCareer.cs
@@ -0,0 +1,30 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class PlacementCareer : EntityBase
+ {
+ [Required, Comment("Id ผู้สมัคร")]
+ public virtual PlacementProfile? PlacementProfile { get; set; }
+
+ [Required, Comment("ระยะเวลาเริ่ม")]
+ public DateTime DurationStart { get; set; } = DateTime.Now.Date;
+
+ [Required, Comment("ระยะเวลาสิ้นสุด")]
+ public DateTime DurationEnd { get; set; } = DateTime.Now.Date;
+
+ [Required, Comment("สถานที่ทำงาน/ฝึกงาน")]
+ public string Name { get; set; } = string.Empty;
+
+ [Required, Comment("ตำแหน่ง/ลักษณะงาน")]
+ public string Position { get; set; } = string.Empty;
+
+ [Required, MaxLength(20), Comment("เงินเดือนสุดท้ายก่อนออก")]
+ public int Salary { get; set; }
+
+ [Required, Comment("เหตุผลที่ออก")]
+ public string Reason { get; set; } = string.Empty;
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementEducation.cs b/BMA.EHR.Domain/Models/Placement/PlacementEducation.cs
new file mode 100644
index 00000000..e1e81b7c
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/PlacementEducation.cs
@@ -0,0 +1,31 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+using BMA.EHR.Domain.Models.MetaData;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class PlacementEducation : EntityBase
+ {
+ [Required, Comment("Id ผู้สมัคร")]
+ public virtual PlacementProfile? PlacementProfile { get; set; }
+
+ [Comment("Idวุฒิที่ได้รับ")]
+ public virtual EducationLevel? EducationLevel { get; set; }
+
+ [Required, Comment("สาขาวิชา/วิชาเอก")]
+ public string Major { get; set; } = string.Empty;
+
+ [Required, MaxLength(10), Comment("คะแนนเฉลี่ยตลอดหลักสูตร")]
+ public float Scores { get; set; }
+
+ [Required, Comment("ชื่อสถานศึกษา")]
+ public string Name { get; set; } = string.Empty;
+
+ [Required, Comment("ระยะเวลาเริ่ม")]
+ public DateTime DurationStart { get; set; } = DateTime.Now.Date;
+
+ [Required, Comment("ระยะเวลาสิ้นสุด")]
+ public DateTime DurationEnd { get; set; } = DateTime.Now.Date;
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementIsProperty.cs b/BMA.EHR.Domain/Models/Placement/PlacementIsProperty.cs
new file mode 100644
index 00000000..d0d7f1e3
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/PlacementIsProperty.cs
@@ -0,0 +1,15 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class PlacementIsProperty : EntityBase
+ {
+ [Required, Comment("ชื่อคุณสมบัติ")]
+ public string Name { get; set; } = string.Empty;
+
+ [Comment("สถานะการใช้งาน")]
+ public bool IsActive { get; set; } = true;
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs
new file mode 100644
index 00000000..3732d8b2
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs
@@ -0,0 +1,228 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+using BMA.EHR.Domain.Models.MetaData;
+using BMA.EHR.Domain.Models.Organizations;
+using BMA.EHR.Domain.Models.Documents;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class PlacementProfile : EntityBase
+ {
+
+ [Comment("Id บรรจุ")]
+ public Placement? Placement { get; set; }
+ [Comment("Id คำนำหน้า")]
+ public Prefix? Prefix { get; set; }
+ [Comment("ชื่อ")]
+ public string? Firstname { get; set; }
+ [Comment("นามสกุล")]
+ public string? Lastname { get; set; }
+ [Comment("ลำดับที่สอบได้")]
+ public int? Number { get; set; }
+ [Comment("Id เลขที่ตำแหน่ง")]
+ public OrganizationPositionEntity? OrganizationPosition { get; set; }
+ [Comment("วันที่บรรจุ")]
+ public DateTime? RecruitDate { get; set; }
+ [Comment("เงินเดือน")]
+ public double? Amount { get; set; }
+ [Comment("เงินประจำตำแหน่ง")]
+ public double? PositionSalaryAmount { get; set; }
+ [Comment("เงินค่าตอบแทนรายเดือน")]
+ public double? MouthSalaryAmount { get; set; }
+ [Comment("ตำแหน่ง (รายละเอียด)")]
+ public string? SalaryClass { get; set; }
+ [Comment("เอกสารอ้างอิง")]
+ public string? SalaryRef { get; set; }
+ [Comment("ข้าราชการฯ กทม.")]
+ public bool? IsOfficer { get; set; }
+ [Comment("สถานะการบรรจุ")]
+ public PlacementStatus? PlacementStatus { get; set; }
+ [Comment("เหตุผลสละสิทธิ์")]
+ public string? RejectReason { get; set; }
+ [Comment("เหตุผลผ่อนผัน")]
+ public string? ReliefReason { get; set; }
+ [Comment("Id เอกสารผ่อนผัน")]
+ public Document? ReliefDoc { get; set; }
+ [Comment("การคัดกรองคุณสมบัติ")]
+ public string? IsProperty { get; set; }
+
+
+ [MaxLength(40), Comment("สัญชาติ")]
+ public string? Nationality { get; set; }
+
+ [MaxLength(40), Comment("วันเกิด")]
+ public DateTime? DateOfBirth { get; set; }
+
+ [Comment("Id สถานภาพ")]
+ public Relationship? Relationship { get; set; }
+
+ [MaxLength(200), Comment("อีเมล")]
+ public string? Email { get; set; }
+
+ [MaxLength(20), Comment("เลขประจำตัวประชาชน")]
+ public string? CitizenId { get; set; }
+
+ [Comment("Id เขตที่ออกบัตรประชาชน")]
+ public District? CitizenDistrict { get; set; }
+
+ [Comment("Id จังหวัดที่ออกบัตรประชาชน")]
+ public Province? CitizenProvince { get; set; }
+
+ [Comment("วันที่ออกบัตร")]
+ public DateTime? CitizenDate { get; set; }
+
+ [MaxLength(20), Comment("โทรศัพท์")]
+ public string? Telephone { get; set; }
+
+ [MaxLength(20), Comment("โทรศัพท์มือถือ")]
+ public string? MobilePhone { get; set; }
+
+ [Comment("ความสามารถพิเศษ")]
+ public string? Knowledge { get; set; }
+
+ [Comment("ที่อยู่ตามทะเบียนบ้าน")]
+ public string? RegistAddress { get; set; }
+
+ [Comment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน")]
+ public Province? RegistProvince { get; set; }
+
+ [Comment("Id อำเภอที่อยู่ตามทะเบียนบ้าน")]
+ public District? RegistDistrict { get; set; }
+
+ [Comment("Id ตำบลที่อยู่ตามทะเบียนบ้าน")]
+ public SubDistrict? RegistSubDistrict { get; set; }
+
+ [MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")]
+ public string? RegistZipCode { get; set; }
+
+ [Comment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน")]
+ public bool? RegistSame { get; set; }
+
+ [Comment("ที่อยู่ปัจจุบัน")]
+ public string? CurrentAddress { get; set; }
+
+ [Comment("Id จังหวัดที่อยู่ปัจจุบัน")]
+ public Province? CurrentProvince { get; set; }
+
+ [Comment("Id อำเภอที่อยู่ปัจจุบัน")]
+ public District? CurrentDistrict { get; set; }
+
+ [Comment("Id ตำบลที่อยู่ปัจจุบัน")]
+ public SubDistrict? CurrentSubDistrict { get; set; }
+
+ [MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน")]
+ public string? CurrentZipCode { get; set; }
+
+ [Comment("คู่สมรส")]
+ public bool? Marry { get; set; }
+
+ [Comment("Id คำนำหน้าชื่อคู่สมรส")]
+ public Prefix? MarryPrefix { get; set; }
+
+ [MaxLength(100), Comment("ชื่อจริงคู่สมรส")]
+ public string? MarryFirstName { get; set; }
+
+ [MaxLength(100), Comment("นามสกุลคู่สมรส")]
+ public string? MarryLastName { get; set; }
+
+ [MaxLength(200), Comment("อาชีพคู่สมรส")]
+ public string? MarryOccupation { get; set; }
+
+ [MaxLength(100), Comment("สัญชาติคู่สมรส")]
+ public string? MarryNationality { get; set; }
+
+ [Comment("Id คำนำหน้าชื่อบิดา")]
+ public Prefix? FatherPrefix { get; set; }
+
+ [MaxLength(100), Comment("ชื่อจริงบิดา")]
+ public string? FatherFirstName { get; set; }
+
+ [MaxLength(100), Comment("นามสกุลบิดา")]
+ public string? FatherLastName { get; set; }
+
+ [MaxLength(200), Comment("อาชีพบิดา")]
+ public string? FatherOccupation { get; set; }
+
+ [MaxLength(100), Comment("สัญชาติบิดา")]
+ public string? FatherNationality { get; set; }
+
+ [Comment("Id คำนำหน้าชื่อมารดา")]
+ public Prefix? MotherPrefix { get; set; }
+
+ [MaxLength(100), Comment("ชื่อจริงมารดา")]
+ public string? MotherFirstName { get; set; }
+
+ [MaxLength(100), Comment("นามสกุลมารดา")]
+ public string? MotherLastName { get; set; }
+
+ [MaxLength(200), Comment("อาชีพมารดา")]
+ public string? MotherOccupation { get; set; }
+
+ [MaxLength(100), Comment("สัญชาติมารดา")]
+ public string? MotherNationality { get; set; }
+
+ [Comment("ประเภทอาชีพที่ทำงานมาก่อน")]
+ public string? OccupationType { get; set; }
+
+ [Comment("สำนัก/บริษัท บริษัท")]
+ public string? OccupationCompany { get; set; }
+
+ [Comment("กอง/ฝ่าย บริษัท")]
+ public string? OccupationDepartment { get; set; }
+
+ [MaxLength(200), Comment("อีเมล บริษัท")]
+ public string? OccupationEmail { get; set; }
+
+ [MaxLength(20), Comment("โทรศัพท์ บริษัท")]
+ public string? OccupationTelephone { get; set; }
+
+ [Comment("ตำแหน่งอาชีพ")]
+ public string? OccupationPosition { 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 double? PointTotalA { get; set; }
+
+ [Comment("คะแนนภาค ก")]
+ public double? PointA { get; set; }
+ [Comment("คะแนนเต็มภาค ข")]
+ public double? PointTotalB { get; set; }
+
+ [Comment("คะแนนภาค ข")]
+ public double? PointB { get; set; }
+
+ [Comment("คะแนนเต็มภาค ค")]
+ public double? PointTotalC { get; set; }
+
+ [Comment("คะแนนภาค ค")]
+ public double? PointC { get; set; }
+
+ [Comment("ลำดับที่สอบได้")]
+ public int ExamNumber { get; set; }
+
+ [Comment("จำนวนครั้งที่สมัครสอบ")]
+ public int ExamRound { get; set; }
+
+ [Comment("ผลสมัครสอบ")]
+ public string? Pass { get; set; }
+ }
+}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementStatus.cs b/BMA.EHR.Domain/Models/Placement/PlacementStatus.cs
new file mode 100644
index 00000000..8a94c9d7
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Placement/PlacementStatus.cs
@@ -0,0 +1,15 @@
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+using BMA.EHR.Domain.Models.Base;
+
+namespace BMA.EHR.Domain.Models.Placement
+{
+ public class PlacementStatus : EntityBase
+ {
+ [Required, Comment("ชื่อสถานะบรรจุ")]
+ public string Name { get; set; } = string.Empty;
+
+ [Comment("สถานะการใช้งาน")]
+ public bool IsActive { get; set; } = true;
+ }
+}
diff --git a/BMA.EHR.Infrastructure/Migrations/20230629033818_add table placements.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20230629033818_add table placements.Designer.cs
new file mode 100644
index 00000000..1f38cfdd
--- /dev/null
+++ b/BMA.EHR.Infrastructure/Migrations/20230629033818_add table placements.Designer.cs
@@ -0,0 +1,10177 @@
+//
+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("20230629033818_add table placements")]
+ partial class addtableplacements
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.8")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.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)");
+
+ 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("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("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("EmployeeClass")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("ประเภทลูกจ้าง");
+
+ b.Property("EmployeeType")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("ประเภทการจ้าง");
+
+ b.Property("EntryStatus")
+ .IsRequired()
+ .HasMaxLength(5)
+ .HasColumnType("varchar(5)");
+
+ b.Property("FatherCareer")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("อาชีพบิดา");
+
+ b.Property("FatherFirstName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อบิดา");
+
+ b.Property("FatherLastName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .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)")
+ .HasComment("Id เพศ");
+
+ 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("IsTransfer")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsVerified")
+ .HasColumnType("tinyint(1)");
+
+ 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("MotherFirstName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อมารดา");
+
+ b.Property("MotherLastName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .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("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("PositionType")
+ .HasColumnType("longtext")
+ .HasComment("ประเภทตำแหน่ง");
+
+ b.Property("PositionTypeId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ประเภทตำแหน่ง");
+
+ b.Property("PrefixId")
+ .HasColumnType("char(36)")
+ .HasComment("Id คำนำหน้า");
+
+ 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("LimitLeaveId");
+
+ 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("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