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

namespace Marco.Pms.Model.Projects
{
    public class WorkItem : TenantRelation
    {
        public Guid Id { get; set; }
        public Guid ActivityId { get; set; }
        public Guid? WorkCategoryId { get; set; }
        public Guid WorkAreaId { get; set; }

        [ForeignKey("WorkAreaId")]
        [ValidateNever]
        public WorkArea? WorkArea { get; set; }

        [ForeignKey("ActivityId")]
        [ValidateNever]
        public ActivityMaster? ActivityMaster { get; set; }


        [ForeignKey("WorkCategoryId")]
        [ValidateNever]
        public WorkCategoryMaster? WorkCategoryMaster { get; set; }

        public Guid? ParentTaskId { get; set; } 

        public double PlannedWork { get; set; }
        public double CompletedWork { get; set; }

        public string? Description { get; set; } 
        public DateTime TaskDate { get; set; }
    }
}
