hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230712135258_Add Message Queue.Designer.cs

10484 lines
456 KiB
C#
Raw Normal View History

// <auto-generated />
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("20230712135258_Add Message Queue")]
partial class AddMessageQueue
{
/// <inheritdoc />
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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsSendEmail")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsSendInbox")
.HasColumnType("tinyint(1)");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.HasKey("Id");
b.ToTable("DeploymentChannels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property<int>("FileSize")
.HasColumnType("int");
b.Property<string>("FileType")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<Guid>("ObjectRefId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("Documents");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasColumnType("longtext")
.HasComment("ยังไม่ชัวใช้อะไรเป็นkey");
b.HasKey("Id");
b.ToTable("LimitLeaves");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("LimitLeaveId")
.HasColumnType("char(36)");
b.Property<double?>("NumLeave")
.HasColumnType("double")
.HasComment("จำนวนที่ลาได้");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("Ability")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<Guid?>("AvatarId")
.HasColumnType("char(36)");
b.Property<string>("AvatarRef")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<DateTime>("BirthDate")
.HasColumnType("datetime(6)")
.HasComment("วันเกิด");
b.Property<Guid?>("BloodGroupId")
.HasColumnType("char(36)")
.HasComment("Id กลุ่มเลือด");
b.Property<string>("CitizenId")
.HasMaxLength(13)
.HasColumnType("varchar(13)")
.HasComment("รหัสบัตรประชาชน");
b.Property<bool?>("Couple")
.HasColumnType("tinyint(1)")
.HasComment("คู่สมรส");
b.Property<string>("CoupleCareer")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("อาชีพคู่สมรส");
b.Property<string>("CoupleFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อคู่สมรส");
b.Property<string>("CoupleLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลคู่สมรส");
b.Property<string>("CoupleLastNameOld")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลคู่สมรส(เดิม)");
b.Property<Guid?>("CouplePrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าคู่สมรส");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUser")
.IsRequired()
.HasMaxLength(250)
.HasColumnType("varchar(250)");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("CurrentAddress")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ที่อยู่ปัจจุบัน");
b.Property<Guid?>("CurrentDistrictId")
.HasColumnType("char(36)")
.HasComment("Id เขตปัจจุบัน");
b.Property<Guid?>("CurrentProvinceId")
.HasColumnType("char(36)")
.HasComment("Id จังหวัดปัจจุบัน");
b.Property<Guid?>("CurrentSubDistrictId")
.HasColumnType("char(36)")
.HasComment("Id แขวงปัจจุบัน");
b.Property<string>("CurrentZipCode")
.HasMaxLength(5)
.HasColumnType("varchar(5)")
.HasComment("รหัสไปรษณีย์ปัจจุบัน");
b.Property<DateTime?>("DateAppoint")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("DateRetire")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)");
b.Property<string>("EmployeeClass")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ประเภทลูกจ้าง");
b.Property<string>("EmployeeType")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ประเภทการจ้าง");
b.Property<string>("EntryStatus")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("varchar(5)");
b.Property<string>("FatherCareer")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("อาชีพบิดา");
b.Property<string>("FatherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อบิดา");
b.Property<string>("FatherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลบิดา");
b.Property<Guid?>("FatherPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าบิดา");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อ");
b.Property<string>("FirstNameOld")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อ(เดิม)");
b.Property<Guid?>("GenderId")
.HasColumnType("char(36)")
.HasComment("Id เพศ");
b.Property<int>("GovAgeAbsent")
.HasColumnType("int");
b.Property<int>("GovAgePlus")
.HasColumnType("int");
b.Property<string>("GovernmentCode")
.HasColumnType("longtext");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsLeave")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsProbation")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsTransfer")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsVerified")
.HasColumnType("tinyint(1)");
b.Property<Guid?>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุล");
b.Property<string>("LastNameOld")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุล(เดิม)");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<DateTime?>("LeaveDate")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("LeaveDateOrder")
.HasColumnType("datetime(6)");
b.Property<string>("LeaveDetail")
.HasColumnType("longtext");
b.Property<string>("LeaveNumberOrder")
.HasColumnType("longtext");
b.Property<string>("LeaveReason")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property<Guid?>("LimitLeaveId")
.HasColumnType("char(36)");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("MotherCareer")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("อาชีพมารดา");
b.Property<string>("MotherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อมารดา");
b.Property<string>("MotherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลมารดา");
b.Property<Guid?>("MotherPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้ามารดา");
b.Property<string>("Nationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติ");
b.Property<string>("Oc")
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("OcId")
.HasColumnType("char(36)")
.HasComment("Id สังกัด");
b.Property<string>("OrganizationOrganization")
.HasColumnType("longtext");
b.Property<Guid?>("OrganizationOrganizationId")
.HasColumnType("char(36)");
b.Property<string>("OrganizationShortName")
.HasColumnType("longtext");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)");
b.Property<string>("Physical")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สถานภาพทางกาย");
b.Property<string>("PosNo")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("PosNoEmployee")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่งลูกจ้าง");
b.Property<Guid?>("PosNoId")
.HasColumnType("char(36)")
.HasComment("Id เลขที่ตำแหน่ง");
b.Property<string>("Position")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionEmployeeGroup")
.HasColumnType("longtext")
.HasComment("กลุ่มงาน");
b.Property<Guid?>("PositionEmployeeGroupId")
.HasColumnType("char(36)")
.HasComment("Id กลุ่มงาน");
b.Property<string>("PositionEmployeeLevel")
.HasColumnType("longtext")
.HasComment("ระดับชั้นงาน");
b.Property<Guid?>("PositionEmployeeLevelId")
.HasColumnType("char(36)")
.HasComment(" Id ระดับชั้นงาน");
b.Property<string>("PositionEmployeePosition")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<Guid?>("PositionEmployeePositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<string>("PositionEmployeePositionSide")
.HasColumnType("longtext")
.HasComment("ด้านของตำแหน่ง");
b.Property<Guid?>("PositionEmployeePositionSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านของตำแหน่ง");
b.Property<string>("PositionExecutive")
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหาร");
b.Property<Guid?>("PositionExecutiveId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่งทางการบริหาร");
b.Property<string>("PositionExecutiveSide")
.HasColumnType("longtext")
.HasComment("ด้านทางการบริหาร");
b.Property<Guid?>("PositionExecutiveSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านทางการบริหาร");
b.Property<Guid?>("PositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)")
.HasComment(" Id ระดับ");
b.Property<string>("PositionLine")
.HasColumnType("longtext")
.HasComment("สายงาน");
b.Property<Guid?>("PositionLineId")
.HasColumnType("char(36)")
.HasComment("Id สายงาน");
b.Property<string>("PositionPathSide")
.HasColumnType("longtext")
.HasComment("ด้าน/สาขา");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้าน/สาขา");
b.Property<string>("PositionType")
.HasColumnType("longtext")
.HasComment("ประเภทตำแหน่ง");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)")
.HasComment("Id ประเภทตำแหน่ง");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้า");
b.Property<Guid?>("PrefixOldId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้า(เดิม)");
b.Property<string>("ProfileType")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("Race")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("เชื้อชาติ");
b.Property<string>("ReasonSameDate")
.HasColumnType("longtext");
b.Property<string>("RegistrationAddress")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("Id แขวงตามทะเบียนบ้าน");
b.Property<Guid?>("RegistrationDistrictId")
.HasColumnType("char(36)")
.HasComment("Id เขตตามทะเบียนบ้าน");
b.Property<Guid?>("RegistrationProvinceId")
.HasColumnType("char(36)")
.HasComment("Id จังหวัดตามทะเบียนบ้าน");
b.Property<bool?>("RegistrationSame")
.HasColumnType("tinyint(1)")
.HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่");
b.Property<Guid?>("RegistrationSubDistrictId")
.HasColumnType("char(36)")
.HasComment("แขวงตามทะเบียนบ้าน");
b.Property<string>("RegistrationZipCode")
.HasMaxLength(5)
.HasColumnType("varchar(5)")
.HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน");
b.Property<Guid?>("RelationshipId")
.HasColumnType("char(36)")
.HasComment("Id สถานะภาพ");
b.Property<Guid?>("ReligionId")
.HasColumnType("char(36)")
.HasComment("Id ศาสนา");
b.Property<string>("TelephoneNumber")
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("เบอร์โทร");
b.Property<DateTime?>("TransferDate")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("VerifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)")
.HasComment("วันที่สิ้นสุด");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่มต้น");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("Field")
.HasColumnType("longtext")
.HasComment("ด้าน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileAbilitys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)")
.HasComment("วันที่สิ้นสุด");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่มต้น");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("Field")
.HasColumnType("longtext")
.HasComment("ด้าน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileAbilityId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.HasIndex("ProfileAbilityId");
b.ToTable("ProfileAbilityHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("CurrentAddress")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ที่อยู่ปัจจุบัน");
b.Property<string>("CurrentDistrict")
.HasColumnType("longtext")
.HasComment("เขตปัจจุบัน");
b.Property<Guid?>("CurrentDistrictId")
.HasColumnType("char(36)")
.HasComment("Id เขตปัจจุบัน");
b.Property<string>("CurrentProvince")
.HasColumnType("longtext")
.HasComment("จังหวัดปัจจุบัน");
b.Property<Guid?>("CurrentProvinceId")
.HasColumnType("char(36)")
.HasComment("Id จังหวัดปัจจุบัน");
b.Property<string>("CurrentSubDistrict")
.HasColumnType("longtext")
.HasComment("แขวงปัจจุบัน");
b.Property<Guid?>("CurrentSubDistrictId")
.HasColumnType("char(36)")
.HasComment("Id แขวงปัจจุบัน");
b.Property<string>("CurrentZipCode")
.HasMaxLength(5)
.HasColumnType("varchar(5)")
.HasComment("รหัสไปรษณีย์ปัจจุบัน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("RegistrationAddress")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ที่อยู่ตามทะเบียนบ้าน");
b.Property<string>("RegistrationDistrict")
.HasColumnType("longtext")
.HasComment("เขตตามทะเบียนบ้าน");
b.Property<Guid?>("RegistrationDistrictId")
.HasColumnType("char(36)")
.HasComment("Id เขตตามทะเบียนบ้าน");
b.Property<string>("RegistrationProvince")
.HasColumnType("longtext")
.HasComment("จังหวัดตามทะเบียนบ้าน");
b.Property<Guid?>("RegistrationProvinceId")
.HasColumnType("char(36)")
.HasComment("Id จังหวัดตามทะเบียนบ้าน");
b.Property<bool?>("RegistrationSame")
.HasColumnType("tinyint(1)")
.HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่");
b.Property<string>("RegistrationSubDistrict")
.HasColumnType("longtext")
.HasComment("แขวงตามทะเบียนบ้าน");
b.Property<Guid?>("RegistrationSubDistrictId")
.HasColumnType("char(36)")
.HasComment("Id แขวงตามทะเบียนบ้าน");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วันที่ได้รับ");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasColumnType("longtext")
.HasComment("ชื่อแบบประเมิน");
b.Property<double?>("Point1")
.HasColumnType("double")
.HasComment("ผลประเมินส่วนที่1 (คะแนน)");
b.Property<double?>("Point1Total")
.HasColumnType("double")
.HasComment("ส่วนที่1 (คะแนน)");
b.Property<double?>("Point2")
.HasColumnType("double")
.HasComment("ผลประเมินส่วนที่2 (คะแนน)");
b.Property<double?>("Point2Total")
.HasColumnType("double")
.HasComment("ส่วนที่2 (คะแนน)");
b.Property<double?>("PointSum")
.HasColumnType("double")
.HasComment("ผลประเมินรวม (คะแนน)");
b.Property<double?>("PointSumTotal")
.HasColumnType("double")
.HasComment("ผลรวม (คะแนน)");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileAssessments");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วันที่ได้รับ");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasColumnType("longtext")
.HasComment("ชื่อแบบประเมิน");
b.Property<double?>("Point1")
.HasColumnType("double")
.HasComment("ผลประเมินส่วนที่1 (คะแนน)");
b.Property<double?>("Point1Total")
.HasColumnType("double")
.HasComment("ส่วนที่1 (คะแนน)");
b.Property<double?>("Point2")
.HasColumnType("double")
.HasComment("ผลประเมินส่วนที่2 (คะแนน)");
b.Property<double?>("Point2Total")
.HasColumnType("double")
.HasComment("ส่วนที่2 (คะแนน)");
b.Property<double?>("PointSum")
.HasColumnType("double")
.HasComment("ผลประเมินรวม (คะแนน)");
b.Property<double?>("PointSumTotal")
.HasColumnType("double")
.HasComment("ผลรวม (คะแนน)");
b.Property<Guid?>("ProfileAssessmentId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileAssessmentId");
b.ToTable("ProfileAssessmentHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<Guid>("AvatarFileId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("CertificateNo")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เลขที่ใบอนุญาต");
b.Property<string>("CertificateType")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อใบอนุญาต");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("ExpireDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่หมดอายุ");
b.Property<DateTime?>("IssueDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ออกใบอนุญาต");
b.Property<string>("Issuer")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานผู้ออกใบอนุญาต");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileCertificates");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("CertificateNo")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เลขที่ใบอนุญาต");
b.Property<string>("CertificateType")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อใบอนุญาต");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("ExpireDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่หมดอายุ");
b.Property<DateTime?>("IssueDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ออกใบอนุญาต");
b.Property<string>("Issuer")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานผู้ออกใบอนุญาต");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileCertificateId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileCertificateId");
b.ToTable("ProfileCertificateHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid?>("DocumentId")
.HasColumnType("char(36)");
b.Property<string>("FirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อ");
b.Property<string>("LastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้า");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid?>("DocumentId")
.HasColumnType("char(36)");
b.Property<string>("FirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อ");
b.Property<string>("LastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้า");
b.Property<Guid?>("ProfileChangeNameId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ChildrenCareer")
.HasColumnType("longtext")
.HasComment("อาชีพบุตร");
b.Property<string>("ChildrenFirstName")
.HasColumnType("longtext")
.HasComment("ชื่อบุตร");
b.Property<string>("ChildrenLastName")
.HasColumnType("longtext")
.HasComment("นามสกุลบุตร");
b.Property<string>("ChildrenPrefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้าบุตร");
b.Property<Guid?>("ChildrenPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าบุตร");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileChildrens");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ChildrenCareer")
.HasColumnType("longtext")
.HasComment("อาชีพบุตร");
b.Property<string>("ChildrenFirstName")
.HasColumnType("longtext")
.HasComment("ชื่อบุตร");
b.Property<string>("ChildrenLastName")
.HasColumnType("longtext")
.HasComment("นามสกุลบุตร");
b.Property<string>("ChildrenPrefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้าบุตร");
b.Property<Guid?>("ChildrenPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าบุตร");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileChildrenId")
.HasColumnType("char(36)");
b.Property<Guid?>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Career")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Prefix")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileCoupleHistory");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<Guid>("DistrictId")
.HasColumnType("char(36)");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("ProvinceId")
.HasColumnType("char(36)");
b.Property<Guid>("SubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี");
b.Property<string>("Detail")
.HasColumnType("text")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Level")
.HasColumnType("longtext")
.HasComment("ระดับความผิด");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<DateTime?>("RefCommandDate")
.HasColumnType("datetime(6)")
.HasComment("เอกสารอ้างอิง (ลงวันที่)");
b.Property<string>("RefCommandNo")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileDisciplines");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี");
b.Property<string>("Detail")
.HasColumnType("text")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Level")
.HasColumnType("longtext")
.HasComment("ระดับความผิด");
b.Property<Guid?>("ProfileDisciplineId")
.HasColumnType("char(36)");
b.Property<DateTime?>("RefCommandDate")
.HasColumnType("datetime(6)")
.HasComment("เอกสารอ้างอิง (ลงวันที่)");
b.Property<string>("RefCommandNo")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)");
b.HasKey("Id");
b.HasIndex("ProfileDisciplineId");
b.ToTable("ProfileDisciplineHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)")
.HasComment("สิ้นสุด");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)")
.HasComment("เริ่มต้น");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileDutys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)")
.HasComment("สิ้นสุด");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)")
.HasComment("เริ่มต้น");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileDutyId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileDutyId");
b.ToTable("ProfileDutyHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Country")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ประเทศ");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Degree")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("วุฒิการศึกษา");
b.Property<string>("Duration")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ระยะเวลา");
b.Property<int>("DurationYear")
.HasColumnType("int")
.HasComment("ระยะเวลาหลักสูตร");
b.Property<string>("EducationLevel")
.HasColumnType("longtext")
.HasComment("ระดับศึกษา");
b.Property<Guid?>("EducationLevelId")
.HasColumnType("char(36)")
.HasComment("Id ระดับศึกษา");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("ถึง");
b.Property<string>("Field")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("สาขาวิชา/ทาง");
b.Property<DateTime?>("FinishDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่สำเร็จการศึกษา");
b.Property<string>("FundName")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ทุน");
b.Property<string>("Gpa")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เกรดเฉลี่ย");
b.Property<string>("Institute")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("สถานศึกษา");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Other")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ข้อมูลการติดต่อ");
b.Property<string>("PositionPath")
.HasColumnType("longtext")
.HasComment("เป็นวุฒิการศึกษาในตำแหน่ง");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)")
.HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<DateTime?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Country")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ประเทศ");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Degree")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("วุฒิการศึกษา");
b.Property<string>("Duration")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ระยะเวลา");
b.Property<int>("DurationYear")
.HasColumnType("int")
.HasComment("ระยะเวลาหลักสูตร");
b.Property<string>("EducationLevel")
.HasColumnType("longtext")
.HasComment("ระดับศึกษา");
b.Property<Guid?>("EducationLevelId")
.HasColumnType("char(36)")
.HasComment("Id ระดับศึกษา");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("ถึง");
b.Property<string>("Field")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("สาขาวิชา/ทาง");
b.Property<DateTime?>("FinishDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่สำเร็จการศึกษา");
b.Property<string>("FundName")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ทุน");
b.Property<string>("Gpa")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เกรดเฉลี่ย");
b.Property<string>("Institute")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("สถานศึกษา");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Other")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ข้อมูลการติดต่อ");
b.Property<string>("PositionPath")
.HasColumnType("longtext")
.HasComment("เป็นวุฒิการศึกษาในตำแหน่ง");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)")
.HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง");
b.Property<Guid?>("ProfileEducationId")
.HasColumnType("char(36)");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime(6)")
.HasComment("ตั้งแต่");
b.HasKey("Id");
b.HasIndex("ProfileEducationId");
b.ToTable("ProfileEducationHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<bool?>("Couple")
.HasColumnType("tinyint(1)")
.HasComment("คู่สมรส");
b.Property<string>("CoupleCareer")
.HasColumnType("longtext")
.HasComment("อาชีพคู่สมรส");
b.Property<string>("CoupleFirstName")
.HasColumnType("longtext")
.HasComment("ชื่อคู่สมรส");
b.Property<string>("CoupleLastName")
.HasColumnType("longtext")
.HasComment("นามสกุลคู่สมรส");
b.Property<string>("CoupleLastNameOld")
.HasColumnType("longtext")
.HasComment("นามสกุลคู่สมรส(เดิม)");
b.Property<string>("CouplePrefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้าคู่สมรส");
b.Property<Guid?>("CouplePrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าคู่สมรส");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("FatherCareer")
.HasColumnType("longtext")
.HasComment("อาชีพบิดา");
b.Property<string>("FatherFirstName")
.HasColumnType("longtext")
.HasComment("ชื่อบิดา");
b.Property<string>("FatherLastName")
.HasColumnType("longtext")
.HasComment("นามสกุลบิดา");
b.Property<string>("FatherPrefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้าบิดา");
b.Property<Guid?>("FatherPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้าบิดา");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("MotherCareer")
.HasColumnType("longtext")
.HasComment("อาชีพมารดา");
b.Property<string>("MotherFirstName")
.HasColumnType("longtext")
.HasComment("ชื่อมารดา");
b.Property<string>("MotherLastName")
.HasColumnType("longtext")
.HasComment("นามสกุลมารดา");
b.Property<string>("MotherPrefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้ามารดา");
b.Property<Guid?>("MotherPrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้ามารดา");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileFamilyHistory");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Career")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Prefix")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileFatherHistory");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateAppoint")
.HasColumnType("datetime(6)")
.HasComment("วันที่สั่งบรรจุ");
b.Property<DateTime?>("DateStart")
.HasColumnType("datetime(6)")
.HasComment("เริ่มปฎิบัติราชการ");
b.Property<string>("GovAge")
.HasColumnType("longtext")
.HasComment("อายุราชการ");
b.Property<int?>("GovAgeAbsent")
.HasColumnType("int")
.HasComment("ขาดราชการ");
b.Property<int?>("GovAgePlus")
.HasColumnType("int")
.HasComment("อายุราชการเกื้อกูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Oc")
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("OcId")
.HasColumnType("char(36)")
.HasComment("Id สังกัด");
b.Property<string>("PosNo")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่ง");
b.Property<Guid?>("PosNoId")
.HasColumnType("char(36)")
.HasComment("Id เลขที่ตำแหน่ง");
b.Property<string>("Position")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionEmployeeGroup")
.HasColumnType("longtext")
.HasComment("กลุ่มงาน");
b.Property<string>("PositionEmployeeLevel")
.HasColumnType("longtext")
.HasComment("ระดับชั้นงาน");
b.Property<string>("PositionEmployeePosition")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionEmployeePositionSide")
.HasColumnType("longtext")
.HasComment("ด้านของตำแหน่ง");
b.Property<string>("PositionExecutive")
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหาร");
b.Property<Guid?>("PositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับตำแหน่ง");
b.Property<string>("PositionLine")
.HasColumnType("longtext")
.HasComment("สายงาน");
b.Property<string>("PositionType")
.HasColumnType("longtext")
.HasComment("ประเภทตำแหน่ง");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("ReasonSameDate")
.HasColumnType("longtext")
.HasComment("เหตุผลกรณีไม่ตรงวัน");
b.Property<string>("RetireDate")
.HasColumnType("longtext")
.HasComment("วันเกษียณอายุ");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileGovernmentHistory");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("BirthDate")
.HasColumnType("datetime(6)")
.HasComment("วันเกิด");
b.Property<string>("BloodGroup")
.HasColumnType("longtext")
.HasComment("กลุ่มเลือด");
b.Property<Guid?>("BloodGroupId")
.HasColumnType("char(36)")
.HasComment("Id กลุ่มเลือด");
b.Property<string>("CitizenId")
.HasMaxLength(13)
.HasColumnType("varchar(13)")
.HasComment("รหัสบัตรประชาชน");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("EmployeeClass")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ประเภทลูกจ้าง");
b.Property<string>("EmployeeType")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ประเภทการจ้าง");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อ");
b.Property<string>("Gender")
.HasColumnType("longtext")
.HasComment("เพศ");
b.Property<Guid?>("GenderId")
.HasColumnType("char(36)")
.HasComment("Id เพศ");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Nationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)")
.HasComment("Id คำนำหน้า");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Race")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("เชื้อชาติ");
b.Property<string>("Relationship")
.HasColumnType("longtext")
.HasComment("สถานะภาพ");
b.Property<Guid?>("RelationshipId")
.HasColumnType("char(36)")
.HasComment("Id สถานะภาพ");
b.Property<string>("Religion")
.HasColumnType("longtext")
.HasComment("ศาสนา");
b.Property<Guid?>("ReligionId")
.HasColumnType("char(36)")
.HasComment("Id ศาสนา");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)")
.HasComment("รายละเอียด");
b.Property<DateTime?>("IssueDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ได้รับ");
b.Property<string>("Issuer")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานที่ออก");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileHonors");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)")
.HasComment("รายละเอียด");
b.Property<DateTime?>("IssueDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ได้รับ");
b.Property<string>("Issuer")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานที่ออก");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileHonorId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileHonorId");
b.ToTable("ProfileHonorHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateAnnounce")
.HasColumnType("datetime(6)")
.HasComment("วันที่ประกาศในราชกิจจาฯ");
b.Property<string>("Insignia")
.HasColumnType("longtext")
.HasComment("ชื่อเครื่องราชฯ");
b.Property<Guid?>("InsigniaId")
.HasColumnType("char(36)");
b.Property<string>("InsigniaType")
.HasColumnType("longtext")
.HasComment("ประเภท");
b.Property<string>("Issue")
.HasMaxLength(300)
.HasColumnType("varchar(300)")
.HasComment("ราชกิจจาฯ ฉบับที่");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("No")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ลำดับที่");
b.Property<string>("Page")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("หน้า");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<DateTime?>("ReceiveDate")
.HasColumnType("datetime(6)")
.HasComment("ลงวันที่");
b.Property<string>("Section")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("ตอน");
b.Property<string>("Volume")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("เล่ม");
b.Property<string>("VolumeNo")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("เล่มที่");
b.Property<int>("Year")
.HasColumnType("int")
.HasComment("ปีที่ยื่นขอ");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileInsignias");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateAnnounce")
.HasColumnType("datetime(6)")
.HasComment("วันที่ประกาศในราชกิจจาฯ");
b.Property<string>("Insignia")
.HasColumnType("longtext")
.HasComment("ชื่อเครื่องราชฯ");
b.Property<Guid?>("InsigniaId")
.HasColumnType("char(36)");
b.Property<string>("InsigniaType")
.HasColumnType("longtext")
.HasComment("ประเภท");
b.Property<string>("Issue")
.HasMaxLength(300)
.HasColumnType("varchar(300)")
.HasComment("ราชกิจจาฯ ฉบับที่");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("No")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("ลำดับที่");
b.Property<string>("Page")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("หน้า");
b.Property<Guid?>("ProfileInsigniaId")
.HasColumnType("char(36)");
b.Property<DateTime?>("ReceiveDate")
.HasColumnType("datetime(6)")
.HasComment("ลงวันที่");
b.Property<string>("Section")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("ตอน");
b.Property<string>("Volume")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("เล่ม");
b.Property<string>("VolumeNo")
.HasMaxLength(30)
.HasColumnType("varchar(30)")
.HasComment("เล่มที่");
b.Property<int>("Year")
.HasColumnType("int")
.HasComment("ปีที่ยื่นขอ");
b.HasKey("Id");
b.HasIndex("ProfileInsigniaId");
b.ToTable("ProfileInsigniaHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEndLeave")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี ที่สิ้นสุดลา");
b.Property<DateTime?>("DateStartLeave")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี ที่เริ่มลา");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<double?>("NumLeave")
.HasColumnType("double")
.HasComment("ลาครั้งที่");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Reason")
.HasColumnType("longtext")
.HasComment("เหตุผล");
b.Property<string>("Status")
.HasColumnType("longtext")
.HasComment("สถานะ");
b.Property<double?>("SumLeave")
.HasColumnType("double")
.HasComment("ลามาแล้ว");
b.Property<double?>("TotalLeave")
.HasColumnType("double")
.HasComment("รวมเป็น");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateEndLeave")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี ที่สิ้นสุดลา");
b.Property<DateTime?>("DateStartLeave")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี ที่เริ่มลา");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<double?>("NumLeave")
.HasColumnType("double")
.HasComment("ลาครั้งที่");
b.Property<Guid?>("ProfileLeaveId")
.HasColumnType("char(36)");
b.Property<string>("Reason")
.HasColumnType("longtext")
.HasComment("เหตุผล");
b.Property<string>("Status")
.HasColumnType("longtext")
.HasComment("สถานะ");
b.Property<double?>("SumLeave")
.HasColumnType("double")
.HasComment("ลามาแล้ว");
b.Property<double?>("TotalLeave")
.HasColumnType("double")
.HasComment("รวมเป็น");
b.Property<Guid?>("TypeLeaveId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileLeaveId");
b.HasIndex("TypeLeaveId");
b.ToTable("ProfileLeaveHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Career")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Prefix")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileMotherHistory");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileNopaids");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileNopaidId")
.HasColumnType("char(36)");
b.Property<string>("Reference")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileNopaidId");
b.ToTable("ProfileNopaidHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("OrganizationId")
.HasColumnType("char(36)")
.HasComment("Id หน่วยงานที่สังกัด");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วันที่");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileOthers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วันที่");
b.Property<string>("Detail")
.HasColumnType("longtext")
.HasComment("รายละเอียด");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("ProfileOtherId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProfileOtherId");
b.ToTable("ProfileOtherHistorys");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("CategoryName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasComment("ประเภทไฟล์-ไม่ใช้");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasComment("ชื่อไฟล์");
b.Property<Guid>("DocumentId")
.HasColumnType("char(36)");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<Guid>("DistrictId")
.HasColumnType("char(36)");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<Guid>("ProvinceId")
.HasColumnType("char(36)");
b.Property<Guid>("SubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<double?>("Amount")
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี รับตำแหน่ง");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<double?>("MouthSalaryAmount")
.HasColumnType("double")
.HasComment("เงินค่าตอบแทนรายเดือน");
b.Property<Guid?>("OcId")
.HasColumnType("char(36)")
.HasComment("Id สังกัด");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)")
.HasComment("Id ชื่อย่อหน่วยงาน");
b.Property<string>("PosNoEmployee")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่งลูกจ้าง");
b.Property<Guid?>("PosNoId")
.HasColumnType("char(36)")
.HasComment("Id เลขที่ตำแหน่ง");
b.Property<Guid?>("PositionEmployeeGroupId")
.HasColumnType("char(36)")
.HasComment("Id กลุ่มงาน");
b.Property<Guid?>("PositionEmployeeLevelId")
.HasColumnType("char(36)")
.HasComment(" Id ระดับชั้นงาน");
b.Property<Guid?>("PositionEmployeePositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<Guid?>("PositionEmployeePositionSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านของตำแหน่ง");
b.Property<Guid?>("PositionExecutiveId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่งทางการบริหาร");
b.Property<Guid?>("PositionExecutiveSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านทางการบริหาร");
b.Property<Guid?>("PositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)")
.HasComment("Id ระดับ");
b.Property<Guid?>("PositionLineId")
.HasColumnType("char(36)")
.HasComment("Id สายงาน");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้าน/สาขา");
b.Property<double?>("PositionSalaryAmount")
.HasColumnType("double")
.HasComment("เงินประจำตำแหน่ง");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)")
.HasComment("Id ประเภทตำแหน่ง");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("SalaryClass")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง (รายละเอียด)");
b.Property<string>("SalaryRef")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileId");
b.ToTable("ProfileSalaries");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<double?>("Amount")
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("Date")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปี รับตำแหน่ง");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<double?>("MouthSalaryAmount")
.HasColumnType("double")
.HasComment("เงินค่าตอบแทนรายเดือน");
b.Property<string>("Oc")
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("OcId")
.HasColumnType("char(36)")
.HasComment("Id สังกัด");
b.Property<string>("OrganizationShortName")
.HasColumnType("longtext");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)");
b.Property<string>("PosNo")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("PosNoEmployee")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่งลูกจ้าง");
b.Property<Guid?>("PosNoId")
.HasColumnType("char(36)")
.HasComment("Id เลขที่ตำแหน่ง");
b.Property<string>("Position")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionEmployeeGroup")
.HasColumnType("longtext")
.HasComment("กลุ่มงาน");
b.Property<Guid?>("PositionEmployeeGroupId")
.HasColumnType("char(36)")
.HasComment("Id กลุ่มงาน");
b.Property<string>("PositionEmployeeLevel")
.HasColumnType("longtext")
.HasComment("ระดับชั้นงาน");
b.Property<Guid?>("PositionEmployeeLevelId")
.HasColumnType("char(36)")
.HasComment(" Id ระดับชั้นงาน");
b.Property<string>("PositionEmployeePosition")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<Guid?>("PositionEmployeePositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<string>("PositionEmployeePositionSide")
.HasColumnType("longtext")
.HasComment("ด้านของตำแหน่ง");
b.Property<Guid?>("PositionEmployeePositionSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านของตำแหน่ง");
b.Property<string>("PositionExecutive")
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหาร");
b.Property<Guid?>("PositionExecutiveId")
.HasColumnType("char(36)")
.HasComment("Id ด้านทางการบริหาร");
b.Property<string>("PositionExecutiveSide")
.HasColumnType("longtext")
.HasComment("ด้านทางการบริหาร");
b.Property<Guid?>("PositionExecutiveSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้านทางการบริหาร");
b.Property<Guid?>("PositionId")
.HasColumnType("char(36)")
.HasComment("Id ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)")
.HasComment(" Id ระดับ");
b.Property<string>("PositionLine")
.HasColumnType("longtext")
.HasComment("สายงาน");
b.Property<Guid?>("PositionLineId")
.HasColumnType("char(36)")
.HasComment("Id สายงาน");
b.Property<string>("PositionPathSide")
.HasColumnType("longtext")
.HasComment("ด้าน/สาขา");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)")
.HasComment("Id ด้าน/สาขา");
b.Property<double?>("PositionSalaryAmount")
.HasColumnType("double")
.HasComment("เงินประจำตำแหน่ง");
b.Property<string>("PositionType")
.HasColumnType("longtext")
.HasComment("ประเภทตำแหน่ง");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)")
.HasComment("Id ประเภทตำแหน่ง");
b.Property<Guid?>("ProfileSalaryId")
.HasColumnType("char(36)");
b.Property<string>("SalaryClass")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง (รายละเอียด)");
b.Property<string>("SalaryRef")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.HasKey("Id");
b.HasIndex("ProfileSalaryId");
b.ToTable("ProfileSalaryHistories");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("ProfileSalaryOrganizations");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<Guid>("PositionId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("PositionId");
b.ToTable("ProfileSalaryPositions");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("ProfileSalaryPositionLevels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("ProfileSalaryPositionsNumbers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("ไม่ใช้");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("ProfileSalaryPositionTypes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateOrder")
.HasColumnType("datetime(6)")
.HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่");
b.Property<string>("Department")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน");
b.Property<string>("Duration")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม");
b.Property<string>("NumberOrder")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ");
b.Property<string>("Place")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("สถานที่ฝึกอบรม/ดูงาน");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime(6)")
.HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน");
b.Property<string>("Topic")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หัวข้อการฝึกอบรม/ดูงาน");
b.Property<int?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("DateOrder")
.HasColumnType("datetime(6)")
.HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่");
b.Property<string>("Department")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน");
b.Property<string>("Duration")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม");
b.Property<string>("NumberOrder")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ");
b.Property<string>("Place")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("สถานที่ฝึกอบรม/ดูงาน");
b.Property<Guid?>("ProfileTrainingId")
.HasColumnType("char(36)");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime(6)")
.HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน");
b.Property<string>("Topic")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หัวข้อการฝึกอบรม/ดูงาน");
b.Property<int?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasColumnType("longtext")
.HasComment("ประเภทการลา");
b.HasKey("Id");
b.ToTable("TypeLeaves");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("เขต/อำเภอ");
b.Property<Guid?>("ProvinceId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProvinceId");
b.ToTable("Districts");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Category")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(6)
.HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("HolidayDate")
.HasColumnType("datetime(6)")
.HasColumnOrder(2)
.HasComment("วันหยุด");
b.Property<bool>("IsSpecial")
.HasColumnType("tinyint(1)")
.HasColumnOrder(5)
.HasComment("เป็นวันหยุดพิเศษหรือไม่");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(250)
.HasColumnType("varchar(250)")
.HasColumnOrder(4)
.HasComment("ชื่อวันหยุด");
b.Property<DateTime>("OriginalDate")
.HasColumnType("datetime(6)")
.HasColumnOrder(3)
.HasComment("วันหยุด(Original)");
b.Property<int>("Year")
.HasColumnType("int")
.HasColumnOrder(1)
.HasComment("ประจำปี");
b.HasKey("Id");
b.ToTable("Holidays");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid?>("InsigniaTypeId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<int>("Level")
.HasColumnType("int")
.HasColumnOrder(4)
.HasComment("ลำดับชั้นของเครื่องราชย์ เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อเครื่องราชย์");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(5)
.HasComment("หมายเหตุ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("OrganizationOrganizations");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("AgencyCode")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("GovernmentCode")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(2)
.HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(4)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(3)
.HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(5)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("OrganizationShortNames");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("ExecutiveName")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("varchar(300)")
.HasColumnOrder(3)
.HasComment("ชื่อตำแหน่งทางการบริหาร");
b.Property<Guid?>("ExecutiveSideId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(9)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("varchar(300)")
.HasColumnOrder(1)
.HasComment("ชื่อตำแหน่ง");
b.Property<Guid?>("PathSideId")
.HasColumnType("char(36)");
b.Property<string>("PositionCategory")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(8)
.HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ");
b.HasKey("Id");
b.ToTable("PositionEmployeeLevels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("PositionEmployeePositions");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("PositionEmployeePositionSides");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อด้านทางการบริหาร");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("PositionExecutiveSides");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(4)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<int>("Level")
.HasColumnType("int")
.HasColumnOrder(3)
.HasComment("ลำดับชั้นของระดับตำแหน่ง");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(2)
.HasComment("ชื่อย่อระดับตำแหน่ง");
b.HasKey("Id");
b.ToTable("PositionLevels");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อสายงาน");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("PositionPaths");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อด้าน/สาขา");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.ToTable("PositionPathSides");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อประเภทตำแหน่ง");
b.HasKey("Id");
b.ToTable("PositionTypes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อประเภทข้อมูลเหรียญตรา");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid?>("DistrictId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("เขต/อำเภอ");
b.Property<string>("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.MessageQueueEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsSend")
.HasColumnType("tinyint(1)")
.HasComment("ทำการส่งข้อความแล้วหรือยัง?");
b.Property<bool>("IsSendEmail")
.HasColumnType("tinyint(1)")
.HasComment("ส่งอีเมลล์หรือไม่?");
b.Property<bool>("IsSendInbox")
.HasColumnType("tinyint(1)")
.HasComment("ส่งไปที่กล่องข้อความหรือไม่?");
b.Property<bool>("IsSendNotification")
.HasColumnType("tinyint(1)")
.HasComment("ส่งการแจ้งเตือนหรือไม่?");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("MessageContent")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รายละเอียดข้อความ");
b.Property<string>("MessagePayLoad")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สิ่งที่แนบมาด้วย");
b.Property<Guid>("ReceiverUserId")
.HasColumnType("char(36)")
.HasComment("รหัสของผู้รับข้อความ");
b.Property<string>("SenderSystem")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("ส่งจากระบบงาน");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หัวเรื่อง");
b.HasKey("Id");
b.ToTable("MessageQueues");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Agency")
.HasColumnType("longtext")
.HasColumnOrder(14)
.HasComment("หน่วยงาน");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Department")
.HasColumnType("longtext")
.HasColumnOrder(16)
.HasComment("ฝ่าย/ส่วน");
b.Property<string>("Government")
.HasColumnType("longtext")
.HasColumnOrder(15)
.HasComment("ส่วนราชการ");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("OrganizationFaxId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationLevelId")
.HasColumnType("char(36)");
b.Property<int?>("OrganizationOrder")
.HasColumnType("int")
.HasColumnOrder(12)
.HasComment("OrganizationOrder");
b.Property<Guid?>("OrganizationOrganizationId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationStatusId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationTelExternalId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationTelInternalId")
.HasColumnType("char(36)");
b.Property<Guid?>("OrganizationTypeId")
.HasColumnType("char(36)");
b.Property<string>("OrganizationUserNote")
.HasColumnType("longtext")
.HasColumnOrder(13)
.HasComment("OrganizationUserNote");
b.Property<Guid?>("ParentId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool?>("IsDirector")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("Is Director");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("OrganizationId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionMasterId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionNumberId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(1)
.HasComment("รายละเอียดการแก้ไข");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool?>("IsDirector")
.HasColumnType("tinyint(1)")
.HasColumnOrder(14)
.HasComment("IsDirector");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("PositionCondition")
.HasColumnType("longtext")
.HasColumnOrder(11)
.HasComment("PositionCondition");
b.Property<Guid?>("PositionExecutiveId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionExecutiveSideId")
.HasColumnType("char(36)");
b.Property<string>("PositionExecutiveSideObject")
.HasColumnType("longtext");
b.Property<Guid?>("PositionId")
.HasColumnType("char(36)")
.HasColumnOrder(2)
.HasComment("PositionId");
b.Property<Guid?>("PositionLineId")
.HasColumnType("char(36)");
b.Property<string>("PositionMasterUserNote")
.HasColumnType("longtext")
.HasColumnOrder(13)
.HasComment("PositionMasterUserNote");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)");
b.Property<string>("PositionPathSideObject")
.HasColumnType("longtext");
b.Property<Guid?>("PositionStatusId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool?>("IsDirector")
.HasColumnType("tinyint(1)")
.HasColumnOrder(14)
.HasComment("IsDirector");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Position")
.HasColumnType("longtext")
.HasColumnOrder(2)
.HasComment("Position");
b.Property<string>("PositionCondition")
.HasColumnType("longtext")
.HasColumnOrder(11)
.HasComment("PositionCondition");
b.Property<string>("PositionExecutive")
.HasColumnType("longtext")
.HasColumnOrder(5)
.HasComment("PositionExecutive");
b.Property<string>("PositionExecutiveSide")
.HasColumnType("longtext")
.HasColumnOrder(6)
.HasComment("PositionExecutiveSide");
b.Property<string>("PositionExecutiveSideObject")
.HasColumnType("longtext");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasColumnOrder(12)
.HasComment("PositionLevel");
b.Property<string>("PositionLine")
.HasColumnType("longtext")
.HasColumnOrder(8)
.HasComment("PositionLine");
b.Property<Guid?>("PositionMasterEntityId")
.HasColumnType("char(36)");
b.Property<string>("PositionMasterUserNote")
.HasColumnType("longtext")
.HasColumnOrder(13)
.HasComment("PositionMasterUserNote");
b.Property<string>("PositionPath")
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("PositionPath");
b.Property<string>("PositionPathSide")
.HasColumnType("longtext")
.HasColumnOrder(7)
.HasComment("PositionPathSide");
b.Property<string>("PositionPathSideObject")
.HasColumnType("longtext");
b.Property<string>("PositionStatus")
.HasColumnType("longtext")
.HasColumnOrder(10)
.HasComment("PositionStatus");
b.Property<string>("PositionType")
.HasColumnType("longtext")
.HasColumnOrder(4)
.HasComment("PositionType");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.HasMaxLength(300)
.HasColumnType("varchar(300)")
.HasColumnOrder(2)
.HasComment("ชื่อ");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("OrganizationShortNameId");
b.ToTable("PositionNumbers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid?>("OrganizationPositionId")
.HasColumnType("char(36)");
b.Property<Guid?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("GovernmentCode")
.HasColumnType("longtext");
b.Property<string>("GovernmentCodeOld")
.HasColumnType("longtext");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("OrganizationOrganization")
.HasColumnType("longtext");
b.Property<Guid?>("OrganizationOrganizationId")
.HasColumnType("char(36)")
.HasComment("ชื่อหน่วยงาน");
b.Property<string>("OrganizationOrganizationOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงานเดิม");
b.Property<Guid?>("OrganizationPositionId")
.HasColumnType("char(36)");
b.Property<string>("OrganizationShortName")
.HasColumnType("longtext");
b.Property<Guid?>("OrganizationShortNameId")
.HasColumnType("char(36)")
.HasComment("รหัสส่วนราชการ");
b.Property<string>("OrganizationShortNameOld")
.HasColumnType("longtext")
.HasComment("รหัสส่วนราชการเดิม");
b.Property<string>("PositionExecutive")
.HasColumnType("longtext");
b.Property<Guid?>("PositionExecutiveId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งทางการบริหาร");
b.Property<string>("PositionExecutiveOld")
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหารเดิม");
b.Property<string>("PositionExecutiveSide")
.HasColumnType("longtext");
b.Property<Guid?>("PositionExecutiveSideId")
.HasColumnType("char(36)")
.HasComment("ด้านทางบริหาร");
b.Property<string>("PositionExecutiveSideOld")
.HasColumnType("longtext")
.HasComment("ด้านทางบริหารเดิม");
b.Property<string>("PositionLevel")
.HasColumnType("longtext");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)")
.HasComment("ระดับตำแหน่ง");
b.Property<string>("PositionLevelOld")
.HasColumnType("longtext")
.HasComment("ระดับตำแหน่งเดิม");
b.Property<string>("PositionNum")
.HasColumnType("longtext");
b.Property<Guid?>("PositionNumId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งเลขที่");
b.Property<string>("PositionNumOld")
.HasColumnType("longtext")
.HasComment("ตำแหน่งเลขที่เดิม");
b.Property<string>("PositionPath")
.HasColumnType("longtext");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งในสายงาน");
b.Property<string>("PositionPathOld")
.HasColumnType("longtext")
.HasComment("ตำแหน่งในสายงานเดิม");
b.Property<string>("PositionPathSide")
.HasColumnType("longtext");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)")
.HasComment("ด้าน/สาขา");
b.Property<string>("PositionPathSideOld")
.HasColumnType("longtext")
.HasComment("ด้าน/สาขาเดิม");
b.Property<string>("PositionType")
.HasColumnType("longtext");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)")
.HasComment("ประเภทตำแหน่ง");
b.Property<string>("PositionTypeOld")
.HasColumnType("longtext")
.HasComment("ประเภทตำแหน่งเดิม");
b.Property<Guid?>("ProfilePositionId")
.HasColumnType("char(36)")
.HasComment("สังกัดที่ถือครอง");
b.Property<string>("Status")
.HasColumnType("longtext")
.HasComment("สถานะการเปลี่ยนแปลง");
b.HasKey("Id");
b.ToTable("Report2s");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.HasColumnType("longtext");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.HasKey("Id");
b.ToTable("Report2DetailHistories");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Education")
.HasColumnType("longtext")
.HasComment("คุณวุฒิ");
b.Property<string>("FullName")
.HasColumnType("longtext")
.HasComment("ชื่อ-สกุล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("NewGovernmentCode")
.HasColumnType("longtext");
b.Property<string>("NewOrganizationOrganization")
.HasColumnType("longtext");
b.Property<Guid?>("NewOrganizationOrganizationId")
.HasColumnType("char(36)")
.HasComment("ชื่อหน่วยงาน กำหนดใหม่");
b.Property<string>("NewOrganizationShortName")
.HasColumnType("longtext");
b.Property<Guid?>("NewOrganizationShortNameId")
.HasColumnType("char(36)")
.HasComment("รหัสส่วนราชการ กำหนดใหม่");
b.Property<string>("NewPositionExecutive")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionExecutiveId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่");
b.Property<string>("NewPositionExecutiveSide")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionExecutiveSideId")
.HasColumnType("char(36)")
.HasComment("ด้านทางบริหาร กำหนดใหม่");
b.Property<string>("NewPositionLevel")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionLevelId")
.HasColumnType("char(36)")
.HasComment("ระดับตำแหน่ง กำหนดใหม่");
b.Property<string>("NewPositionNum")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionNumId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งเลขที่ กำหนดใหม่");
b.Property<string>("NewPositionPath")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionPathId")
.HasColumnType("char(36)")
.HasComment("ตำแหน่งในสายงาน กำหนดใหม่");
b.Property<string>("NewPositionPathSide")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionPathSideId")
.HasColumnType("char(36)")
.HasComment("ด้าน/สาขา กำหนดใหม่");
b.Property<string>("NewPositionType")
.HasColumnType("longtext");
b.Property<Guid?>("NewPositionTypeId")
.HasColumnType("char(36)")
.HasComment("ประเภทตำแหน่ง กำหนดใหม่");
b.Property<string>("OldGovernmentCode")
.HasColumnType("longtext");
b.Property<string>("OldOrganizationOrganization")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน กำหนดเดิม");
b.Property<string>("OldOrganizationShortName")
.HasColumnType("longtext")
.HasComment("รหัสส่วนราชการ กำหนดเดิม");
b.Property<string>("OldPositionExecutive")
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม");
b.Property<string>("OldPositionExecutiveSide")
.HasColumnType("longtext")
.HasComment("ด้านทางบริหาร กำหนดเดิม");
b.Property<string>("OldPositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับตำแหน่ง กำหนดเดิม");
b.Property<string>("OldPositionNum")
.HasColumnType("longtext")
.HasComment("ตำแหน่งเลขที่ กำหนดเดิม");
b.Property<string>("OldPositionPath")
.HasColumnType("longtext")
.HasComment("ตำแหน่งในสายงาน กำหนดเดิม");
b.Property<string>("OldPositionPathSide")
.HasColumnType("longtext")
.HasComment("ด้าน/สาขา กำหนดเดิม");
b.Property<string>("OldPositionType")
.HasColumnType("longtext")
.HasComment("ประเภทตำแหน่ง กำหนดเดิม");
b.Property<Guid?>("OrganizationPositionId")
.HasColumnType("char(36)");
b.Property<Guid?>("ProfilePositionId")
.HasColumnType("char(36)")
.HasComment("สังกัดที่ถือครอง");
b.Property<Guid?>("Report2DetailHistoryId")
.HasColumnType("char(36)");
b.Property<double?>("Salary")
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<double?>("SalaryMonth")
.HasColumnType("double")
.HasComment("เงินตอบแทนรายเดือน");
b.Property<double?>("SalaryPosition")
.HasColumnType("double")
.HasComment("เงินประจำตำแหน่ง");
b.Property<string>("Status")
.HasColumnType("longtext")
.HasComment("สถานะการเปลี่ยนแปลง");
b.HasKey("Id");
b.HasIndex("Report2DetailHistoryId");
b.ToTable("Report2Histories");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่สิ้นสุดบัญชี");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รอบการสอบ");
b.Property<int>("Number")
.HasMaxLength(10)
.HasColumnType("int")
.HasComment("จำนวนผู้สอบได้");
b.Property<Guid>("PlacementTypeId")
.HasColumnType("char(36)");
b.Property<string>("Round")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ครั้งที่");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่มบัญชีบัญชี");
b.Property<int>("Year")
.HasMaxLength(5)
.HasColumnType("int")
.HasComment("ปีงบประมาณ");
b.HasKey("Id");
b.HasIndex("PlacementTypeId");
b.ToTable("Placements");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("CertificateNo")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เลขที่ใบอนุญาต");
b.Property<string>("CertificateType")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อใบอนุญาต");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime?>("ExpireDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่หมดอายุ");
b.Property<DateTime?>("IssueDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ออกใบอนุญาต");
b.Property<string>("Issuer")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หน่วยงานผู้ออกใบอนุญาต");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid>("PlacementProfileId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("PlacementProfileId");
b.ToTable("PlacementCertificates");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Country")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ประเทศ");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Degree")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("วุฒิการศึกษา");
b.Property<string>("Duration")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ระยะเวลา");
b.Property<int>("DurationYear")
.HasColumnType("int")
.HasComment("ระยะเวลาหลักสูตร");
b.Property<Guid?>("EducationLevelId")
.HasColumnType("char(36)");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)")
.HasComment("ถึง");
b.Property<string>("Field")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("สาขาวิชา/ทาง");
b.Property<DateTime?>("FinishDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่สำเร็จการศึกษา");
b.Property<string>("FundName")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ทุน");
b.Property<string>("Gpa")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เกรดเฉลี่ย");
b.Property<string>("Institute")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("สถานศึกษา");
b.Property<bool?>("IsDate")
.HasColumnType("tinyint(1)")
.HasComment("ประเภทช่วงเวลาการศึกษา");
b.Property<bool?>("IsEducation")
.HasColumnType("tinyint(1)")
.HasComment("เป็นวุฒิศึกษาในตำแหน่ง");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Other")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasComment("ข้อมูลการติดต่อ");
b.Property<Guid>("PlacementProfileId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)");
b.Property<DateTime?>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อคุณสมบัติ");
b.HasKey("Id");
b.ToTable("PlacementIsProperties");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<double?>("Amount")
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<Guid?>("BloodGroupId")
.HasColumnType("char(36)");
b.Property<DateTime?>("CitizenDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ออกบัตร");
b.Property<Guid?>("CitizenDistrictId")
.HasColumnType("char(36)");
b.Property<string>("CitizenId")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เลขประจำตัวประชาชน");
b.Property<Guid?>("CitizenProvinceId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("CurrentAddress")
.HasColumnType("longtext")
.HasComment("ที่อยู่ปัจจุบัน");
b.Property<Guid?>("CurrentDistrictId")
.HasColumnType("char(36)");
b.Property<Guid?>("CurrentProvinceId")
.HasColumnType("char(36)");
b.Property<Guid?>("CurrentSubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("CurrentZipCode")
.HasMaxLength(10)
.HasColumnType("varchar(10)")
.HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน");
b.Property<DateTime?>("DateOfBirth")
.HasMaxLength(40)
.HasColumnType("datetime(6)")
.HasComment("วันเกิด");
b.Property<string>("Email")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อีเมล");
b.Property<int>("ExamNumber")
.HasColumnType("int")
.HasComment("ลำดับที่สอบได้");
b.Property<int>("ExamRound")
.HasColumnType("int")
.HasComment("จำนวนครั้งที่สมัครสอบ");
b.Property<string>("FatherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงบิดา");
b.Property<string>("FatherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลบิดา");
b.Property<string>("FatherNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติบิดา");
b.Property<string>("FatherOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพบิดา");
b.Property<Guid?>("FatherPrefixId")
.HasColumnType("char(36)");
b.Property<string>("Firstname")
.HasColumnType("longtext")
.HasComment("ชื่อ");
b.Property<Guid?>("GenderId")
.HasColumnType("char(36)");
b.Property<bool?>("IsOfficer")
.HasColumnType("tinyint(1)")
.HasComment("ข้าราชการฯ กทม.");
b.Property<string>("IsProperty")
.HasColumnType("longtext")
.HasComment("การคัดกรองคุณสมบัติ");
b.Property<bool>("IsRelief")
.HasColumnType("tinyint(1)")
.HasComment("ผ่อนผัน");
b.Property<string>("Knowledge")
.HasColumnType("longtext")
.HasComment("ความสามารถพิเศษ");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Lastname")
.HasColumnType("longtext")
.HasComment("นามสกุล");
b.Property<bool?>("Marry")
.HasColumnType("tinyint(1)")
.HasComment("คู่สมรส");
b.Property<string>("MarryFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงคู่สมรส");
b.Property<string>("MarryLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลคู่สมรส");
b.Property<string>("MarryNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติคู่สมรส");
b.Property<string>("MarryOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพคู่สมรส");
b.Property<Guid?>("MarryPrefixId")
.HasColumnType("char(36)");
b.Property<string>("MobilePhone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("โทรศัพท์มือถือ");
b.Property<string>("MotherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงมารดา");
b.Property<string>("MotherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลมารดา");
b.Property<string>("MotherNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติมารดา");
b.Property<string>("MotherOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพมารดา");
b.Property<Guid?>("MotherPrefixId")
.HasColumnType("char(36)");
b.Property<double?>("MouthSalaryAmount")
.HasColumnType("double")
.HasComment("เงินค่าตอบแทนรายเดือน");
b.Property<string>("Nationality")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("สัญชาติ");
b.Property<int?>("Number")
.HasColumnType("int")
.HasComment("ลำดับที่สอบได้");
b.Property<string>("OccupationCompany")
.HasColumnType("longtext")
.HasComment("สำนัก/บริษัท บริษัท");
b.Property<string>("OccupationDepartment")
.HasColumnType("longtext")
.HasComment("กอง/ฝ่าย บริษัท");
b.Property<string>("OccupationEmail")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อีเมล บริษัท");
b.Property<string>("OccupationPosition")
.HasColumnType("longtext")
.HasComment("ตำแหน่งอาชีพ");
b.Property<string>("OccupationTelephone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("โทรศัพท์ บริษัท");
b.Property<string>("OccupationType")
.HasColumnType("longtext")
.HasComment("ประเภทอาชีพที่ทำงานมาก่อน");
b.Property<Guid?>("OrganizationPositionId")
.HasColumnType("char(36)");
b.Property<string>("Pass")
.HasColumnType("longtext")
.HasComment("ผลสมัครสอบ");
b.Property<Guid?>("PlacementId")
.HasColumnType("char(36)");
b.Property<string>("PlacementStatus")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สถานะการบรรจุ");
b.Property<double?>("PointA")
.HasColumnType("double")
.HasComment("คะแนนภาค ก");
b.Property<double?>("PointB")
.HasColumnType("double")
.HasComment("คะแนนภาค ข");
b.Property<double?>("PointC")
.HasColumnType("double")
.HasComment("คะแนนภาค ค");
b.Property<double?>("PointTotalA")
.HasColumnType("double")
.HasComment("คะแนนเต็มภาค ก");
b.Property<double?>("PointTotalB")
.HasColumnType("double")
.HasComment("คะแนนเต็มภาค ข");
b.Property<double?>("PointTotalC")
.HasColumnType("double")
.HasComment("คะแนนเต็มภาค ค");
b.Property<Guid?>("PositionLevelId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionLineId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionNumberId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionPathId")
.HasColumnType("char(36)");
b.Property<Guid?>("PositionPathSideId")
.HasColumnType("char(36)");
b.Property<double?>("PositionSalaryAmount")
.HasColumnType("double")
.HasComment("เงินประจำตำแหน่ง");
b.Property<Guid?>("PositionTypeId")
.HasColumnType("char(36)");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)");
b.Property<string>("Race")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("เชื้อชาติ");
b.Property<DateTime?>("RecruitDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่บรรจุ");
b.Property<string>("RegistAddress")
.HasColumnType("longtext")
.HasComment("ที่อยู่ตามทะเบียนบ้าน");
b.Property<Guid?>("RegistDistrictId")
.HasColumnType("char(36)");
b.Property<Guid?>("RegistProvinceId")
.HasColumnType("char(36)");
b.Property<bool?>("RegistSame")
.HasColumnType("tinyint(1)")
.HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน");
b.Property<Guid?>("RegistSubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("RegistZipCode")
.HasMaxLength(10)
.HasColumnType("varchar(10)")
.HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน");
b.Property<string>("RejectReason")
.HasColumnType("longtext")
.HasComment("เหตุผลสละสิทธิ์");
b.Property<Guid?>("RelationshipId")
.HasColumnType("char(36)");
b.Property<Guid?>("ReliefDocId")
.HasColumnType("char(36)");
b.Property<string>("ReliefReason")
.HasColumnType("longtext")
.HasComment("เหตุผลผ่อนผัน");
b.Property<Guid?>("ReligionId")
.HasColumnType("char(36)");
b.Property<DateTime?>("ReportingDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่รายงานตัว");
b.Property<string>("SalaryClass")
.HasColumnType("longtext")
.HasComment("ตำแหน่ง (รายละเอียด)");
b.Property<string>("SalaryRef")
.HasColumnType("longtext")
.HasComment("เอกสารอ้างอิง");
b.Property<string>("Telephone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.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("PositionLevelId");
b.HasIndex("PositionLineId");
b.HasIndex("PositionNumberId");
b.HasIndex("PositionPathId");
b.HasIndex("PositionPathSideId");
b.HasIndex("PositionTypeId");
b.HasIndex("PrefixId");
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.PlacementType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อประเภทบรรจุ");
b.HasKey("Id");
b.ToTable("PlacementTypes");
});
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.HR.LimitLeave", "LimitLeave")
.WithMany("Profiles")
.HasForeignKey("LimitLeaveId");
b.Navigation("Avatar");
b.Navigation("LimitLeave");
});
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.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.HR.Profile", "Profile")
.WithMany("Insignias")
.HasForeignKey("ProfileId");
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.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.HR.Profile", "Profile")
.WithMany("Salaries")
.HasForeignKey("ProfileId");
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.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.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.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.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.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("PositionLevel");
b.Navigation("PositionLine");
b.Navigation("PositionNumber");
b.Navigation("PositionPath");
b.Navigation("PositionPathSide");
b.Navigation("PositionType");
b.Navigation("Prefix");
b.Navigation("RegistDistrict");
b.Navigation("RegistProvince");
b.Navigation("RegistSubDistrict");
b.Navigation("Relationship");
b.Navigation("ReliefDoc");
b.Navigation("Religion");
});
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("FamilyHistory");
b.Navigation("FatherHistory");
b.Navigation("GovernmentHistory");
b.Navigation("Honors");
b.Navigation("Insignias");
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.MetaData.District", b =>
{
b.Navigation("SubDistricts");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b =>
{
b.Navigation("Districts");
});
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.PlacementProfile", b =>
{
b.Navigation("PlacementCertificates");
b.Navigation("PlacementEducations");
});
#pragma warning restore 612, 618
}
}
}