hrms-api-backend/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs
Suphonchai Phoonsawat 682c88c2db Add BeginningLeaveCount and BeginningLeaveDays to LeaveBeginnings table
- Altered LeaveDays column to update its comment.
- Added BeginningLeaveCount column to track the number of leave occurrences.
- Added BeginningLeaveDays column to store the total days of leave carried over.
2026-02-11 09:44:18 +07:00

52 lines
1.8 KiB
C#

using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Leave.Commons;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Leave.Requests
{
public class LeaveBeginning : EntityBase
{
[Required, Comment("รหัส Profile ในระบบทะเบียนประวัติ")]
public Guid ProfileId { get; set; } = Guid.Empty;
public string? Prefix { get; set; } = string.Empty;
public string? FirstName { get; set; } = string.Empty;
public string? LastName { get; set; } = string.Empty;
[Required, Comment("รหัสประเภทการลา")]
public Guid LeaveTypeId { get; set; } = Guid.Empty;
public LeaveType LeaveType { get; set; }
[Required, Comment("ปีงบประมาณ")]
public int LeaveYear { get; set; } = 0;
[Required, Comment("จำนวนวันลาทั้งหมด")]
public double LeaveDays { get; set; } = 0.0;
[Required, Comment("จำนวนวันลาที่ใช้ไป")]
public double LeaveDaysUsed { get; set; } = 0.0;
[Comment("จำนวนครั้งที่ลาสะสม")]
public int LeaveCount { get; set; } = 0;
public Guid? RootDnaId { get; set; }
public Guid? Child1DnaId { get; set; }
public Guid? Child2DnaId { get; set; }
public Guid? Child3DnaId { get; set; }
public Guid? Child4DnaId { get; set; }
[Required, Comment("จำนวนวันลายกมา")]
public double BeginningLeaveDays { get; set; } = 0.0;
[Comment("จำนวนครั้งที่ลายกมา")]
public int BeginningLeaveCount { get; set; } = 0;
}
}