using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.Projects;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;


namespace Marco.Pms.Model.Activities
{
    public class TaskAllocation : TenantRelation
    {
        public Guid Id { get; set; }
        public Guid? ParentTaskId { get; set; }
        public DateTime AssignmentDate { get; set; }
        public double PlannedTask { get; set; }
        public double CompletedTask { get; set; }
        public double ReportedTask { get; set; }
        public DateTime? ReportedDate { get; set; }
        public DateTime? ApprovedDate { get; set; }
        public string? Description { get; set; }

        public Guid AssignedBy { get; set; }   //Employee Id 

        [ForeignKey("AssignedBy")]
        [ValidateNever]
        public Employee? Employee { get; set; }

        public Guid? ReportedById { get; set; }   //Employee Id

        [ForeignKey("ReportedById")]
        [ValidateNever]
        public Employee? ReportedBy { get; set; }

        public Guid? ApprovedById { get; set; }   //Employee Id

        [ForeignKey("ApprovedById")]
        [ValidateNever]
        public Employee? ApprovedBy { get; set; }

        public Guid WorkItemId { get; set; }

        [ForeignKey("WorkItemId")]
        [ValidateNever]
        public WorkItem? WorkItem { get; set; }

        public Guid? WorkStatusId { get; set; }

        [ForeignKey("WorkStatusId")]
        [ValidateNever]
        public WorkStatusMaster? WorkStatus { get; set; }
    }
}
