using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PSTW_CentralSystem.Areas.OTcalculate.Models
{
    [Table("otstatus")]
    public class OtStatusModel
    {
        [Key]
        public int StatusId { get; set; }
        public int UserId { get; set; }

        public int Month { get; set; }
        public int Year { get; set; }
        public DateTime SubmitDate { get; set; }

        public string? HouStatus { get; set; }
        public string? HodStatus { get; set; }
        public string? ManagerStatus { get; set; }
        public string? HrStatus { get; set; }

        public string? HouUpdate { get; set; }
        public string? HodUpdate { get; set; }
        public string? ManagerUpdate { get; set; }
        public string? HrUpdate { get; set; }

        public DateTime? HouSubmitDate { get; set; }
        public DateTime? HodSubmitDate { get; set; }
        public DateTime? ManagerSubmitDate { get; set; }
        public DateTime? HrSubmitDate { get; set; }

        public string? FilePath { get; set; }


        public bool Updated =>
            !string.IsNullOrEmpty(HouUpdate) ||
            !string.IsNullOrEmpty(HodUpdate) ||
            !string.IsNullOrEmpty(ManagerUpdate) ||
            !string.IsNullOrEmpty(HrUpdate);

    }
    public class StatusDto
    {
        public int StatusId { get; set; }
    }

    public class UpdateStatusDto
    {
        public int StatusId { get; set; }
        public string Decision { get; set; } 
    }


}
