add migration for LeaveRequest
This commit is contained in:
parent
d6e43a44bb
commit
5c51bf1f99
9 changed files with 2156 additions and 6 deletions
9
BMA.EHR.Domain/Models/Leave/Commons/LeaveType.cs
Normal file
9
BMA.EHR.Domain/Models/Leave/Commons/LeaveType.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using BMA.EHR.Domain.Models.Base;
|
||||
|
||||
namespace BMA.EHR.Domain.Models.Leave.Commons
|
||||
{
|
||||
public class LeaveType : EntityBase
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
108
BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs
Normal file
108
BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
using BMA.EHR.Domain.Models.Base;
|
||||
using BMA.EHR.Domain.Models.Documents;
|
||||
using BMA.EHR.Domain.Models.Leave.Commons;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BMA.EHR.Domain.Models.Leave.Requests
|
||||
{
|
||||
public class LeaveRequest : EntityBase
|
||||
{
|
||||
[Required, Comment("Id ประเภทการลา")]
|
||||
public LeaveType Type { get; set; }
|
||||
|
||||
[Required, Comment("วัน เดือน ปีเริ่มต้นลา")]
|
||||
public DateTime LeaveStartDate { get; set; } = DateTime.Now;
|
||||
|
||||
[Required, Comment("วัน เดือน ปีสิ้นสุดลา")]
|
||||
public DateTime LeaveEndDate { get; set; } = DateTime.Now;
|
||||
|
||||
[Required, Comment("เขียนที่")]
|
||||
public string LeaveWrote { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("สถานที่ติดต่อขณะลา")]
|
||||
public string LeaveAddress { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("หมายเลขที่ติดต่อขณะลา")]
|
||||
public string LeaveNumber { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("รายละเอียดการลา")]
|
||||
public string LeaveDetail { get; set; } = string.Empty;
|
||||
|
||||
public Document LeaveDocument { get; set; }
|
||||
|
||||
public Document LeaveDraftDocument { get; set; }
|
||||
|
||||
public string LeaveSalaryText { get; set; } = string.Empty;
|
||||
|
||||
public string WifeDayName { get; set; } = string.Empty;
|
||||
|
||||
public string WifeDayDateBorn { get; set; } = string.Empty;
|
||||
|
||||
public int RestDayOldTotal { get; set; } = 0;
|
||||
|
||||
public int RestDayCurrentTotal { get; set; } = 0;
|
||||
|
||||
public bool OrdainDayStatus { get; set; } = false;
|
||||
|
||||
public string OrdainDayLocationName { get; set; } = string.Empty;
|
||||
|
||||
public string OrdainDayLocationAddress { get; set; } = string.Empty;
|
||||
|
||||
public string OrdainDayLocationNumber { get; set; } = string.Empty;
|
||||
|
||||
public DateTime OrdainDayOrdination { get; set; } = DateTime.Now;
|
||||
|
||||
public string OrdainDayBuddhistLentName { get; set; } = string.Empty;
|
||||
|
||||
public string OrdainDayBuddhistLentAddress { get; set; } = string.Empty;
|
||||
|
||||
public bool HajjDayStatus { get; set; } = false;
|
||||
|
||||
public string AbsentDaySummon { get; set; } = string.Empty;
|
||||
|
||||
public string AbsentDayLocation { get; set; } = string.Empty;
|
||||
|
||||
public DateTime AbsentDayRegistorDate { get; set; } = DateTime.Now;
|
||||
|
||||
public string AbsentDayGetIn { get; set; } = string.Empty;
|
||||
|
||||
public string AbsentDayAt { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDaySubject { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayDegreeLevel { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayUniversityName { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayTrainingSubject { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayTrainingName { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayCountry { get; set; } = string.Empty;
|
||||
|
||||
public string StudyDayScholarship { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayName { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayPosition { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayLevel { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayLevelCountry { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayCountryHistory { get; set; } = string.Empty;
|
||||
|
||||
public string CoupleDayTotalHistory { get; set; } = string.Empty;
|
||||
|
||||
public DateTime CoupleDayStartDateHistory { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime CoupleDayEndDateHistory { get; set; } = DateTime.Now;
|
||||
|
||||
public string CoupleDaySumTotalHistory { get; set; } = string.Empty;
|
||||
|
||||
public string LeaveStatus { get; set; } = string.Empty;
|
||||
|
||||
public string LeaveComment { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,552 @@
|
|||
// <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("20231127043459_Add LeaveType and LeaveRequest Table")]
|
||||
partial class AddLeaveTypeandLeaveRequestTable
|
||||
{
|
||||
/// <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.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<Guid>("KeycloakUserId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัส User ของ Keycloak ที่ร้องขอ");
|
||||
|
||||
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>("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<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<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>("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("ProcessUserTimeStamps");
|
||||
});
|
||||
|
||||
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<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>("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>("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("UserTimeStamps");
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddLeaveTypeandLeaveRequestTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,900 @@
|
|||
// <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("20231127044646_Add LeaveType and LeaveRequest Table and Add to Dbcontext")]
|
||||
partial class AddLeaveTypeandLeaveRequestTableandAddtoDbcontext
|
||||
{
|
||||
/// <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<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")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LeaveTypes");
|
||||
});
|
||||
|
||||
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<string>("CoupleDayCountryHistory")
|
||||
.IsRequired()
|
||||
.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")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("CoupleDayTotalHistory")
|
||||
.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<bool>("HajjDayStatus")
|
||||
.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.Property<string>("LeaveAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานที่ติดต่อขณะลา");
|
||||
|
||||
b.Property<string>("LeaveComment")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("LeaveDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดการลา");
|
||||
|
||||
b.Property<Guid>("LeaveDocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("LeaveDraftDocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("LeaveEndDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วัน เดือน ปีสิ้นสุดลา");
|
||||
|
||||
b.Property<string>("LeaveNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("หมายเลขที่ติดต่อขณะลา");
|
||||
|
||||
b.Property<string>("LeaveSalaryText")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("LeaveStartDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วัน เดือน ปีเริ่มต้นลา");
|
||||
|
||||
b.Property<string>("LeaveStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
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<int>("RestDayCurrentTotal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RestDayOldTotal")
|
||||
.HasColumnType("int");
|
||||
|
||||
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("LeaveDocumentId");
|
||||
|
||||
b.HasIndex("LeaveDraftDocumentId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("LeaveRequests");
|
||||
});
|
||||
|
||||
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<Guid>("KeycloakUserId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัส User ของ Keycloak ที่ร้องขอ");
|
||||
|
||||
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>("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<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<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>("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("ProcessUserTimeStamps");
|
||||
});
|
||||
|
||||
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<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>("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>("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("UserTimeStamps");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDocument")
|
||||
.WithMany()
|
||||
.HasForeignKey("LeaveDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument")
|
||||
.WithMany()
|
||||
.HasForeignKey("LeaveDraftDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LeaveDocument");
|
||||
|
||||
b.Navigation("LeaveDraftDocument");
|
||||
|
||||
b.Navigation("Type");
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddLeaveTypeandLeaveRequestTableandAddtoDbcontext : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Document",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
FileName = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
FileSize = table.Column<int>(type: "int", nullable: false),
|
||||
FileType = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Detail = table.Column<string>(type: "text", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ObjectRefId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Document", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LeaveTypes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LeaveTypes", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LeaveRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
TypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
LeaveStartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วัน เดือน ปีเริ่มต้นลา"),
|
||||
LeaveEndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วัน เดือน ปีสิ้นสุดลา"),
|
||||
LeaveWrote = table.Column<string>(type: "longtext", nullable: false, comment: "เขียนที่")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveAddress = table.Column<string>(type: "longtext", nullable: false, comment: "สถานที่ติดต่อขณะลา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveNumber = table.Column<string>(type: "longtext", nullable: false, comment: "หมายเลขที่ติดต่อขณะลา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveDetail = table.Column<string>(type: "longtext", nullable: false, comment: "รายละเอียดการลา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveDocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
LeaveDraftDocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
LeaveSalaryText = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
WifeDayName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
WifeDayDateBorn = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
RestDayOldTotal = table.Column<int>(type: "int", nullable: false),
|
||||
RestDayCurrentTotal = table.Column<int>(type: "int", nullable: false),
|
||||
OrdainDayStatus = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
OrdainDayLocationName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
OrdainDayLocationAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
OrdainDayLocationNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
OrdainDayOrdination = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
OrdainDayBuddhistLentName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
OrdainDayBuddhistLentAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
HajjDayStatus = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
AbsentDaySummon = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
AbsentDayLocation = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
AbsentDayRegistorDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
AbsentDayGetIn = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
AbsentDayAt = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDaySubject = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayDegreeLevel = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayUniversityName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayTrainingSubject = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayTrainingName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayCountry = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StudyDayScholarship = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayPosition = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayLevel = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayLevelCountry = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayCountryHistory = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayTotalHistory = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CoupleDayStartDateHistory = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CoupleDayEndDateHistory = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CoupleDaySumTotalHistory = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveStatus = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LeaveComment = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LeaveRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_LeaveRequests_Document_LeaveDocumentId",
|
||||
column: x => x.LeaveDocumentId,
|
||||
principalTable: "Document",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_LeaveRequests_Document_LeaveDraftDocumentId",
|
||||
column: x => x.LeaveDraftDocumentId,
|
||||
principalTable: "Document",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_LeaveRequests_LeaveTypes_TypeId",
|
||||
column: x => x.TypeId,
|
||||
principalTable: "LeaveTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LeaveRequests_LeaveDocumentId",
|
||||
table: "LeaveRequests",
|
||||
column: "LeaveDocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LeaveRequests_LeaveDraftDocumentId",
|
||||
table: "LeaveRequests",
|
||||
column: "LeaveDraftDocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LeaveRequests_TypeId",
|
||||
table: "LeaveRequests",
|
||||
column: "TypeId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "LeaveRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Document");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "LeaveTypes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,327 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
.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<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")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LeaveTypes");
|
||||
});
|
||||
|
||||
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<string>("CoupleDayCountryHistory")
|
||||
.IsRequired()
|
||||
.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")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("CoupleDayTotalHistory")
|
||||
.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<bool>("HajjDayStatus")
|
||||
.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.Property<string>("LeaveAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานที่ติดต่อขณะลา");
|
||||
|
||||
b.Property<string>("LeaveComment")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("LeaveDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดการลา");
|
||||
|
||||
b.Property<Guid>("LeaveDocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("LeaveDraftDocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("LeaveEndDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วัน เดือน ปีสิ้นสุดลา");
|
||||
|
||||
b.Property<string>("LeaveNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("หมายเลขที่ติดต่อขณะลา");
|
||||
|
||||
b.Property<string>("LeaveSalaryText")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("LeaveStartDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วัน เดือน ปีเริ่มต้นลา");
|
||||
|
||||
b.Property<string>("LeaveStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
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<int>("RestDayCurrentTotal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RestDayOldTotal")
|
||||
.HasColumnType("int");
|
||||
|
||||
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("LeaveDocumentId");
|
||||
|
||||
b.HasIndex("LeaveDraftDocumentId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("LeaveRequests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -533,6 +854,33 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
b.ToTable("UserTimeStamps");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDocument")
|
||||
.WithMany()
|
||||
.HasForeignKey("LeaveDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument")
|
||||
.WithMany()
|
||||
.HasForeignKey("LeaveDraftDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LeaveDocument");
|
||||
|
||||
b.Navigation("LeaveDraftDocument");
|
||||
|
||||
b.Navigation("Type");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.Leave.Commons;
|
||||
using BMA.EHR.Domain.Models.Leave.Requests;
|
||||
using BMA.EHR.Domain.Models.Leave.TimeAttendants;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
|
@ -18,6 +20,15 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
|
||||
public DbSet<AdditionalCheckRequest> AdditionalCheckRequests { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Leave System "
|
||||
|
||||
public DbSet<LeaveType> LeaveTypes { get; set; }
|
||||
|
||||
public DbSet<LeaveRequest> LeaveRequests { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using Amazon.S3.Model;
|
||||
using Amazon.S3.Model.Internal.MarshallTransformations;
|
||||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories.Leaves.TimeAttendants;
|
||||
using BMA.EHR.Domain.Common;
|
||||
using BMA.EHR.Domain.Models.Leave.TimeAttendants;
|
||||
|
|
@ -14,10 +12,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.DirectoryServices.ActiveDirectory;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Permissions;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace BMA.EHR.Leave.Service.Controllers
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue