hrms-api-backend/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs
2025-05-02 20:19:01 +07:00

214 lines
8 KiB
C#

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 List<LeaveDocument> LeaveDocument { get; set; } = new();
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 double RestDayOldTotal { get; set; } = 0;
public double 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; }
public DateTime? CoupleDayStartDateHistory { get; set; }
public DateTime? CoupleDayEndDateHistory { get; set; }
public string? CoupleDaySumTotalHistory { get; set; }
[Required, Comment("สถานะของคำร้อง")]
public string LeaveStatus { get; set; } = string.Empty;
[Comment("ความเห็นของผู้บังคับบัญชา")]
public string? LeaveComment { get; set; } = string.Empty;
[Comment("ความเห็นของผู้อำนวยการสำนัก")]
public string? LeaveDirectorComment { get; set; } = string.Empty;
public double LeaveTotal { get; set; } = 0;
public DateTime? LeaveLast { get; set; }
public Guid KeycloakUserId { get; set; } = Guid.Empty;
public DateTime? LeaveBirthDate { get; set; }
public DateTime? LeaveGovernmentDate { get; set; }
public int? LeaveSalary { get; set; }
[Comment("สถานะของคำขอยกเลิก")]
public string? LeaveCancelStatus { get; set; } = string.Empty;
[Comment("เหตุผลในการขอยกเลิก")]
public string? LeaveCancelComment { get; set; } = string.Empty;
[Comment("เอกสารแนบในการขอยกเลิกการลา")]
public Document? LeaveCancelDocument { get; set; }
[Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")]
public string? ApproveStep { get; set; } = string.Empty;
[Comment("เขียนที่ (ขอยกเลิก)")]
public string? CancelLeaveWrote { get; set; } = string.Empty;
[Comment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")]
public string? LeaveRange { get; set; } = string.Empty;
[Comment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")]
public string? LeaveRangeEnd { get; set; } = string.Empty;
[Comment("เรียนใคร")]
public string? Dear { get; set; } = string.Empty;
[Comment("code ของประเภทการลา")]
public string? LeaveTypeCode { get; set; } = string.Empty;
[Comment("ตำแหน่งผู้ยื่นขอ")]
public string? PositionName { get; set; } = string.Empty;
[Comment("ระดับผู้ยื่นขอ")]
public string? PositionLevelName { get; set; } = string.Empty;
[Comment("สังกัดผู้ยื่นขอ")]
public string? OrganizationName { get; set; } = string.Empty;
public string? Prefix { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? CitizenId { get; set; }
public string? Gender { get; set; }
public string? Root { get; set; }
public string? Child1 { get; set; }
public string? Child2 { get; set; }
public string? Child3 { get; set; }
public string? Child4 { get; set; }
public Guid? RootId { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child4Id { get; set; }
public Guid? ProfileId { get; set; }
public string? ProfileType { get; set; }
public double? Amount { get; set; }
public DateTime? BirthDate { get; set; } = DateTime.MinValue;
public DateTime? DateAppoint { get; set; } = DateTime.MinValue;
public string? LeaveSubTypeName { get; set; } = string.Empty;
public string? CommanderPosition { get; set; } = string.Empty;
public List<LeaveRequestApprover> Approvers { get; set; } = new();
public Guid? RootDnaId { get; set; } = Guid.Empty;
public Guid? Child1DnaId { get; set; } = Guid.Empty;
public Guid? Child2DnaId { get; set; } = Guid.Empty;
public Guid? Child3DnaId { get; set; } = Guid.Empty;
public Guid? Child4DnaId { get; set; } = Guid.Empty;
}
}