hrms-api-backend/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.Designer.cs
Suphonchai Phoonsawat 19c30e69df
Some checks failed
release-dev / release-dev (push) Failing after 11s
CRUD Leave Beginning
2025-04-23 11:25:12 +07:00

1494 lines
66 KiB
C#

// <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.LeaveDb
{
[DbContext(typeof(LeaveDbContext))]
[Migration("20250423025058_Add Profile Info to LeaveBegining")]
partial class AddProfileInfotoLeaveBegining
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("BMA.EHR.Domain.Models.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("Document");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Code")
.IsRequired()
.HasColumnType("longtext")
.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>("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>("Limit")
.HasColumnType("int")
.HasComment("จำนวนวันลาสูงสุดประจำปี");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อประเภทการลา");
b.HasKey("Id");
b.ToTable("LeaveTypes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", 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>("FirstName")
.HasColumnType("longtext");
b.Property<string>("LastName")
.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<double>("LeaveDays")
.HasColumnType("double")
.HasComment("จำนวนวันลายกมา");
b.Property<double>("LeaveDaysUsed")
.HasColumnType("double")
.HasComment("จำนวนวันลาที่ใช้ไป");
b.Property<Guid>("LeaveTypeId")
.HasColumnType("char(36)")
.HasComment("รหัสประเภทการลา");
b.Property<int>("LeaveYear")
.HasColumnType("int")
.HasComment("ปีงบประมาณ");
b.Property<string>("Prefix")
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)")
.HasComment("รหัส Profile ในระบบทะเบียนประวัติ");
b.HasKey("Id");
b.HasIndex("LeaveTypeId");
b.ToTable("LeaveBeginnings");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", 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>("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>("LeaveRequestId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.HasIndex("LeaveRequestId");
b.ToTable("LeaveDocuments");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("AbsentDayAt")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("AbsentDayGetIn")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("AbsentDayLocation")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("AbsentDayRegistorDate")
.HasColumnType("datetime(6)");
b.Property<string>("AbsentDaySummon")
.IsRequired()
.HasColumnType("longtext");
b.Property<double?>("Amount")
.HasColumnType("double");
b.Property<string>("ApproveStep")
.HasColumnType("longtext")
.HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ");
b.Property<DateTime?>("BirthDate")
.HasColumnType("datetime(6)");
b.Property<string>("CancelLeaveWrote")
.HasColumnType("longtext")
.HasComment("เขียนที่ (ขอยกเลิก)");
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
b.Property<string>("CitizenId")
.HasColumnType("longtext");
b.Property<string>("CommanderPosition")
.HasColumnType("longtext");
b.Property<string>("CoupleDayCountryHistory")
.HasColumnType("longtext");
b.Property<DateTime?>("CoupleDayEndDateHistory")
.HasColumnType("datetime(6)");
b.Property<string>("CoupleDayLevel")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CoupleDayLevelCountry")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CoupleDayName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CoupleDayPosition")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime?>("CoupleDayStartDateHistory")
.HasColumnType("datetime(6)");
b.Property<string>("CoupleDaySumTotalHistory")
.HasColumnType("longtext");
b.Property<string>("CoupleDayTotalHistory")
.HasColumnType("longtext");
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)");
b.Property<string>("Dear")
.HasColumnType("longtext")
.HasComment("เรียนใคร");
b.Property<string>("FirstName")
.HasColumnType("longtext");
b.Property<string>("Gender")
.HasColumnType("longtext");
b.Property<bool>("HajjDayStatus")
.HasColumnType("tinyint(1)");
b.Property<Guid>("KeycloakUserId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.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>("LeaveAddress")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สถานที่ติดต่อขณะลา");
b.Property<DateTime?>("LeaveBirthDate")
.HasColumnType("datetime(6)");
b.Property<string>("LeaveCancelComment")
.HasColumnType("longtext")
.HasComment("เหตุผลในการขอยกเลิก");
b.Property<Guid?>("LeaveCancelDocumentId")
.HasColumnType("char(36)");
b.Property<string>("LeaveCancelStatus")
.HasColumnType("longtext")
.HasComment("สถานะของคำขอยกเลิก");
b.Property<string>("LeaveComment")
.HasColumnType("longtext")
.HasComment("ความเห็นของผู้บังคับบัญชา");
b.Property<string>("LeaveDetail")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รายละเอียดการลา");
b.Property<string>("LeaveDirectorComment")
.HasColumnType("longtext")
.HasComment("ความเห็นของผู้อำนวยการสำนัก");
b.Property<Guid?>("LeaveDraftDocumentId")
.HasColumnType("char(36)");
b.Property<DateTime>("LeaveEndDate")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปีสิ้นสุดลา");
b.Property<DateTime?>("LeaveGovernmentDate")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("LeaveLast")
.HasColumnType("datetime(6)");
b.Property<string>("LeaveNumber")
.IsRequired()
.HasColumnType("longtext")
.HasComment("หมายเลขที่ติดต่อขณะลา");
b.Property<string>("LeaveRange")
.HasColumnType("longtext")
.HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย");
b.Property<string>("LeaveRangeEnd")
.HasColumnType("longtext")
.HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย");
b.Property<int?>("LeaveSalary")
.HasColumnType("int");
b.Property<string>("LeaveSalaryText")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("LeaveStartDate")
.HasColumnType("datetime(6)")
.HasComment("วัน เดือน ปีเริ่มต้นลา");
b.Property<string>("LeaveStatus")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สถานะของคำร้อง");
b.Property<string>("LeaveSubTypeName")
.HasColumnType("longtext");
b.Property<double>("LeaveTotal")
.HasColumnType("double");
b.Property<string>("LeaveTypeCode")
.HasColumnType("longtext")
.HasComment("code ของประเภทการลา");
b.Property<string>("LeaveWrote")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เขียนที่");
b.Property<string>("OrdainDayBuddhistLentAddress")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("OrdainDayBuddhistLentName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("OrdainDayLocationAddress")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("OrdainDayLocationName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("OrdainDayLocationNumber")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("OrdainDayOrdination")
.HasColumnType("datetime(6)");
b.Property<bool>("OrdainDayStatus")
.HasColumnType("tinyint(1)");
b.Property<string>("OrganizationName")
.HasColumnType("longtext")
.HasComment("สังกัดผู้ยื่นขอ");
b.Property<string>("PositionLevelName")
.HasColumnType("longtext")
.HasComment("ระดับผู้ยื่นขอ");
b.Property<string>("PositionName")
.HasColumnType("longtext")
.HasComment("ตำแหน่งผู้ยื่นขอ");
b.Property<string>("Prefix")
.HasColumnType("longtext");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("ProfileType")
.HasColumnType("longtext");
b.Property<double>("RestDayCurrentTotal")
.HasColumnType("double");
b.Property<double>("RestDayOldTotal")
.HasColumnType("double");
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");
b.Property<string>("StudyDayCountry")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDayDegreeLevel")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDayScholarship")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDaySubject")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDayTrainingName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDayTrainingSubject")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("StudyDayUniversityName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TypeId")
.HasColumnType("char(36)");
b.Property<string>("WifeDayDateBorn")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("WifeDayName")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("LeaveCancelDocumentId");
b.HasIndex("LeaveDraftDocumentId");
b.HasIndex("TypeId");
b.ToTable("LeaveRequests");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("ApproveStatus")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ApproveType")
.HasColumnType("longtext");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("longtext");
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>("FirstName")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("KeycloakId")
.HasColumnType("char(36)");
b.Property<string>("LastName")
.IsRequired()
.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<Guid>("LeaveRequestId")
.HasColumnType("char(36)");
b.Property<string>("PositionName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Prefix")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<int>("Seq")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LeaveRequestId");
b.ToTable("LeaveRequestApprovers");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CheckDate")
.HasColumnType("datetime(6)")
.HasComment("*วันที่ลงเวลา");
b.Property<bool>("CheckInEdit")
.HasColumnType("tinyint(1)")
.HasComment("*ขอลงเวลาช่วงเช้า");
b.Property<bool>("CheckOutEdit")
.HasColumnType("tinyint(1)")
.HasComment("*ขอลงเวลาช่วงบ่าย");
b.Property<string>("Comment")
.HasColumnType("longtext")
.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>("Description")
.IsRequired()
.HasColumnType("longtext")
.HasComment("*หมายเหตุขอลงเวลาพิเศษ");
b.Property<string>("FirstName")
.HasColumnType("longtext");
b.Property<Guid>("KeycloakUserId")
.HasColumnType("char(36)")
.HasComment("รหัส User ของ Keycloak ที่ร้องขอ");
b.Property<string>("LastName")
.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>("Prefix")
.HasColumnType("longtext");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สถานะการอนุมัติ");
b.HasKey("Id");
b.ToTable("AdditionalCheckRequests");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", 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>("Description")
.IsRequired()
.HasColumnType("longtext")
.HasComment("คำอธิบาย");
b.Property<string>("EndTimeAfternoon")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เวลาออกงานช่วงบ่าย");
b.Property<string>("EndTimeMorning")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เวลาออกงานช่วงเช้า");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)");
b.Property<bool>("IsDefault")
.HasColumnType("tinyint(1)")
.HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)");
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>("StartTimeAfternoon")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เวลาเข้างานช่วงบ่าย");
b.Property<string>("StartTimeMorning")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เวลาเข้างานช่วงเช้า");
b.HasKey("Id");
b.ToTable("DutyTimes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CheckIn")
.HasColumnType("datetime(6)")
.HasComment("วัน เวลา เข้างาน");
b.Property<string>("CheckInImageUrl")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รูปถ่ายสถานที่ Check-In");
b.Property<double>("CheckInLat")
.HasColumnType("double")
.HasComment("พิกัดละติจูด Check-In");
b.Property<string>("CheckInLocationName")
.HasColumnType("longtext")
.HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In");
b.Property<double>("CheckInLon")
.HasColumnType("double")
.HasComment("พิกัดลองจิจูด Check-In");
b.Property<string>("CheckInPOI")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In");
b.Property<string>("CheckInRemark")
.HasColumnType("longtext")
.HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In");
b.Property<string>("CheckInStatus")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สถานะ Check-In");
b.Property<DateTime?>("CheckOut")
.HasColumnType("datetime(6)")
.HasComment("วัน เวลา ออกงาน");
b.Property<string>("CheckOutImageUrl")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รูปถ่ายสถานที่ Check-Out");
b.Property<double>("CheckOutLat")
.HasColumnType("double")
.HasComment("พิกัดละติจูด Check-Out");
b.Property<string>("CheckOutLocationName")
.HasColumnType("longtext")
.HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out");
b.Property<double>("CheckOutLon")
.HasColumnType("double")
.HasComment("พิกัดลองจิจูด Check-Out");
b.Property<string>("CheckOutPOI")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out");
b.Property<string>("CheckOutRemark")
.HasColumnType("longtext")
.HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out");
b.Property<string>("CheckOutStatus")
.HasColumnType("longtext")
.HasComment("สถานะ Check-Out");
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
b.Property<string>("CitizenId")
.HasColumnType("longtext");
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>("EditReason")
.HasColumnType("longtext")
.HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ");
b.Property<string>("EditStatus")
.HasColumnType("longtext")
.HasComment("สถานะการของลงเวลาพิเศษ");
b.Property<string>("FirstName")
.HasColumnType("longtext");
b.Property<string>("Gender")
.HasColumnType("longtext");
b.Property<bool>("IsLocationCheckIn")
.HasColumnType("tinyint(1)")
.HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In");
b.Property<bool>("IsLocationCheckOut")
.HasColumnType("tinyint(1)")
.HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out");
b.Property<bool>("IsProcess")
.HasColumnType("tinyint(1)")
.HasComment("นำไปประมวลผลแล้วหรือยัง");
b.Property<Guid>("KeycloakUserId")
.HasColumnType("char(36)")
.HasComment("รหัส User ของ Keycloak");
b.Property<string>("LastName")
.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>("Prefix")
.HasColumnType("longtext");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("ProfileType")
.HasColumnType("longtext");
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("ProcessUserTimeStamps");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Calendar")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์");
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)")
.HasComment("รหัส Profile ในระบบทะเบียนประวัติ");
b.HasKey("Id");
b.ToTable("UserCalendars");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", 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>("DutyTimeId")
.HasColumnType("char(36)")
.HasComment("รหัสรอบการลงเวลา");
b.Property<DateTime?>("EffectiveDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่มีผล");
b.Property<bool>("IsProcess")
.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<Guid>("ProfileId")
.HasColumnType("char(36)")
.HasComment("รหัส Profile ในระบบทะเบียนประวัติ");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("หมายเหตุ");
b.HasKey("Id");
b.HasIndex("DutyTimeId");
b.ToTable("UserDutyTimes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CheckIn")
.HasColumnType("datetime(6)")
.HasComment("วัน เวลา เข้างาน");
b.Property<string>("CheckInImageUrl")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รูปถ่ายสถานที่ Check-In");
b.Property<double>("CheckInLat")
.HasColumnType("double")
.HasComment("พิกัดละติจูด Check-In");
b.Property<string>("CheckInLocationName")
.HasColumnType("longtext")
.HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In");
b.Property<double>("CheckInLon")
.HasColumnType("double")
.HasComment("พิกัดลองจิจูด Check-In");
b.Property<string>("CheckInPOI")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In");
b.Property<string>("CheckInRemark")
.HasColumnType("longtext")
.HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In");
b.Property<DateTime?>("CheckOut")
.HasColumnType("datetime(6)")
.HasComment("วัน เวลา ออกงาน");
b.Property<string>("CheckOutImageUrl")
.IsRequired()
.HasColumnType("longtext")
.HasComment("รูปถ่ายสถานที่ Check-Out");
b.Property<double>("CheckOutLat")
.HasColumnType("double")
.HasComment("พิกัดละติจูด Check-Out");
b.Property<string>("CheckOutLocationName")
.HasColumnType("longtext")
.HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out");
b.Property<double>("CheckOutLon")
.HasColumnType("double")
.HasComment("พิกัดลองจิจูด Check-Out");
b.Property<string>("CheckOutPOI")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out");
b.Property<string>("CheckOutRemark")
.HasColumnType("longtext")
.HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out");
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
b.Property<string>("CitizenId")
.HasColumnType("longtext");
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>("FirstName")
.HasColumnType("longtext");
b.Property<string>("Gender")
.HasColumnType("longtext");
b.Property<bool>("IsLocationCheckIn")
.HasColumnType("tinyint(1)")
.HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In");
b.Property<bool>("IsLocationCheckOut")
.HasColumnType("tinyint(1)")
.HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out");
b.Property<bool>("IsProcess")
.HasColumnType("tinyint(1)")
.HasComment("นำไปประมวลผลแล้วหรือยัง");
b.Property<Guid>("KeycloakUserId")
.HasColumnType("char(36)")
.HasComment("รหัส User ของ Keycloak");
b.Property<string>("LastName")
.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>("Prefix")
.HasColumnType("longtext");
b.Property<Guid?>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("ProfileType")
.HasColumnType("longtext");
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("UserTimeStamps");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType")
.WithMany()
.HasForeignKey("LeaveTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LeaveType");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
.WithMany()
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest")
.WithMany("LeaveDocument")
.HasForeignKey("LeaveRequestId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Document");
b.Navigation("LeaveRequest");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument")
.WithMany()
.HasForeignKey("LeaveCancelDocumentId");
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument")
.WithMany()
.HasForeignKey("LeaveDraftDocumentId");
b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type")
.WithMany()
.HasForeignKey("TypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LeaveCancelDocument");
b.Navigation("LeaveDraftDocument");
b.Navigation("Type");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest")
.WithMany("Approvers")
.HasForeignKey("LeaveRequestId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LeaveRequest");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b =>
{
b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime")
.WithMany()
.HasForeignKey("DutyTimeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DutyTime");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b =>
{
b.Navigation("Approvers");
b.Navigation("LeaveDocument");
});
#pragma warning restore 612, 618
}
}
}