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

namespace PSTW_CentralSystem.Areas.IT.Models
{
    [Table("it_request_status")]
    public class ItRequestStatus
    {
        [Key]
        public int StatusId { get; set; }

        public int ItRequestId { get; set; }
        [ForeignKey("ItRequestId")]
        public ItRequest? Request { get; set; }

        public int ItApprovalFlowId { get; set; }
        [ForeignKey("ItApprovalFlowId")]
        public ItApprovalFlow? Flow { get; set; }

        // per-stage statuses
        [MaxLength(20)] public string? HodStatus { get; set; }
        [MaxLength(20)] public string? GitHodStatus { get; set; }
        [MaxLength(20)] public string? FinHodStatus { get; set; }
        [MaxLength(20)] public string? MgmtStatus { get; set; }

        public DateTime? HodSubmitDate { get; set; }
        public DateTime? GitHodSubmitDate { get; set; }
        public DateTime? FinHodSubmitDate { get; set; }
        public DateTime? MgmtSubmitDate { get; set; }



        [MaxLength(20)]
        public string? OverallStatus { get; set; } // Pending / Approved / Rejected
    }
}
