hrms-api-backend/BMA.EHR.Domain/Models/Commands/Core/Command.cs

249 lines
10 KiB
C#

using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class Command : EntityBase
{
[MaxLength(10), Comment("เลขที่คำสั่ง")]
public string CommandNo { get; set; } = string.Empty;
[MaxLength(4), Comment("ปีที่ออกคำสั่ง")]
public string CommandYear { get; set; } = string.Empty;
[Required, Comment("รหัสอ้างอิงประเภทคำสั่ง")]
public Guid CommandTypeId { get; set; } = Guid.Empty;
public CommandType CommandType { get; set; }
[Required, Comment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง")]
public Guid IssuerOrganizationId { get; set; } = Guid.Empty;
[Required, Comment("หน่วยงานที่ออกคำสั่ง")]
public string IssuerOrganizationName { get; set; } = string.Empty;
[Required, Comment("รหัสอ้างอิงสถานะคำสั่ง")]
public Guid CommandStatusId { get; set; } = Guid.Empty;
public CommandStatus CommandStatus { get; set; }
[Comment("รหัสอ้างอิงผู้มีอำนาจลงนาม")]
public Guid AuthorizedUserId { get; set; } = Guid.Empty;
[Comment("ชื่อผู้มีอำนาจลงนาม")]
public string AuthorizedUserFullName { get; set; } = string.Empty;
[Comment("ตำแหน่งผู้มีอำนาจลงนาม")]
public string AuthorizedPosition { get; set; } = string.Empty;
[Comment("วันที่คำสั่งมีผล")]
public DateTime? CommandAffectDate { get; set; }
[Comment("วันที่ออกคำสั่ง")]
public DateTime? CommandExcecuteDate { get; set; }
[Required, MaxLength(500), Comment("คำสั่งเรื่อง")]
public string CommandSubject { get; set; } = string.Empty;
#region " For Placement Command "
[Comment("อ้างอิงรอบการสอบ")]
public Guid? PlacementId { get; set; }
public Placement.Placement Placement { get; set; }
[Comment("ตำแหน่งที่บรรจุ")]
public string? PositionName { get; set; } = string.Empty;
[Comment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")]
public string? ConclusionRegisterNo { get; set; } = string.Empty;
[Comment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)")]
public DateTime? ConclusionRegisterDate { get; set; } = DateTime.Now;
[Comment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")]
public string? ConclusionResultNo { get; set; } = string.Empty;
[Comment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")]
public DateTime? ConclusionResultDate { get; set; } = DateTime.Now;
#endregion
#region " คำสั่ง C-PM-05, C-PM-06 "
[Comment("การประชุม ครั้งที่")]
public string? ConclusionMeetingNo { get; set; } = string.Empty;
[Comment("การประชุม ลงวันที่")]
public DateTime? ConclusionMeetingDate { get; set; } = DateTime.Now;
#endregion
#region " คำสั่ง C-PM-08, C-PM-09 "
[Comment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)")]
public string? ConclusionReturnNo { get; set; } = string.Empty;
[Comment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)")]
public DateTime? ConclusionReturnDate { get; set; } = DateTime.Now;
#endregion
#region " คำสั่ง C-PM-09 "
[Comment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร")]
public string? SourceOrganizationName { get; set; }
[Comment("คำสั่งที่ (ให้เข้ารับราชการทหาร)")]
public string? MilitaryCommandNo { get; set; }
[Comment("ลงวันที่ (ให้เข้ารับราชการทหาร)")]
public DateTime? MilitaryCommanDate { get; set; }
#endregion
#region " C-PM-10,C-PM-11,C-PM-12,C-PM-21 "
[Comment("หน่วยงานที่ออกคำสั่งบรรจุ")]
public string? PlacementCommandIssuer { get; set; }
[Comment("เลขที่คำสั่งบรรจุ")]
public string? PlacementCommandNo { get; set; }
[Comment("คำสั่งบรรจุลงวันที่")]
public DateTime? PlacementCommandDate { get; set; }
#endregion
#region " C-PM-10 "
[Comment("ตำแหน่งที่บรรจุ")]
public string? PlacementPositionName { get; set; }
[Comment("สังกัดที่บรรจุ")]
public string? PlacementOrganizationName { get; set; }
[Comment("วันที่เริ่มทดลองปฏิบัติราชการ")]
public DateTime? ProbationStartDate { get; set; }
[Comment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ")]
public DateTime? ProbationEndDate { get; set; }
[Comment("ประธานคณะกรรมการ")]
public string? ChairManFullName { get; set; }
[Comment("กรรมการคนที่ 1")]
public string? Member1FullName { get; set; }
[Comment("กรรมการคนที่ 2")]
public string? Member2FullName { get; set; }
#endregion
#region " C-PM-13 "
[Comment("ส่วนราชการที่รับโอน")]
public string? ReceiveOrganizationName { get; set; }
#endregion
#region " C-PM-14 "
[Comment("ส่วนราชการที่ให้โอน")]
public string? TransferOrganizationName { get; set; }
[Comment("มติ กก. ครั้งที่ (การรับโอน)")]
public string? ConclusionReceiveNo { get; set; }
[Comment("ลงวันที่ (การรับโอน)")]
public DateTime? ConclusionReceiveDate { get; set; }
#endregion
#region " C-PM-16 "
[Comment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)")]
public string? GovAidCommandNo { get; set; }
[Comment("ลงวันที่ (คำสั่งช่วยราชการ)")]
public DateTime? GovAidCommandDate { get; set; }
#endregion
#region " C-PM-18, C-PM-19 and C-PM-20 "
[Comment("รายละเอียดการกระทำผิด")]
public string? Fault { get; set; }
[Comment("ฐานความผิด")]
public string? GuiltyBasis { get; set; }
[Comment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)")]
public string? ConclusionFireNo { get; set; }
[Comment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)")]
public DateTime? ConclusionFireDate { get; set; }
[Comment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)")]
public string? ConclusionFireResolution { get; set; }
#endregion
#region " คำสั่ง C-PM-22 "
[Comment("การประชุม ครั้งที่")]
public string? ConclusionTranferNo { get; set; } = string.Empty;
[Comment("การประชุม ลงวันที่")]
public DateTime? ConclusionTranferDate { get; set; } = DateTime.Now;
#endregion
#region " C-PM-25 - C-PM-32 "
[Comment("ระดับความผิด")]
public string? FaultLevel { get; set; }
[Comment("กรณีความผิด")]
public string? CaseFault { get; set; }
[Comment("ผลดำเนินการพิจารณา")]
public string? Result { get; set; }
[Comment("อ้างอิงมาตราตามกฏหมาย")]
public string? RefRaw { get; set; }
[Comment("Id เรื่องร้องเรียน")]
public Guid? ComplaintId { get; set; }
#endregion
#region " C-PM-33 - C-PM-32 "
[Comment("Id เรื่องเงินเดือน")]
public Guid? SalaryPeriodId { get; set; }
[MaxLength(4), Comment("ปีรอบเงินเดือน")]
public string? Year { get; set; }
[Comment("รอบเงินเดือน")]
public string? SalaryPeriod { get; set; }
[Comment("วันที่เริ่มรักษาการแทน")]
public DateTime? ActStartDate { get; set; }
[Comment("วันที่สิ้นสุดการรักษาการแทน")]
public DateTime? ActEndDate { get; set; }
#endregion
public virtual List<CommandDocument> Documents { get; set; } = new();
public virtual List<CommandReceiver> Receivers { get; set; }
public virtual List<CommandDeployment> Deployments { get; set; }
[Required, Comment("รหัสส่วนราชการผู้ออกคำสั่ง")]
public virtual Guid OwnerGovId { get; set; } = Guid.Empty;
}
}