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

namespace Marco.Pms.Model.Projects
{
    public class Project : TenantRelation
    {
        [Key]
        public Guid Id { get; set; }
        [Required]
        [DisplayName("Project Name")]
        public string? Name { get; set; }
        public string? ShortName { get; set; }

        [DisplayName("Project Address")]
        public string? ProjectAddress { get; set; }

        [DisplayName("Contact Person")]

        public string? ContactPerson { get; set; }

        public DateTime? StartDate { get; set; }
        public DateTime? EndDate { get; set; }

        [DisplayName("Project Status")]
        public Guid ProjectStatusId { get; set; }

        [ValidateNever]
        [ForeignKey(nameof(ProjectStatusId))]
        public StatusMaster? ProjectStatus { get; set; }

        public Guid PromoterId { get; set; } = Guid.Parse("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea");

        [ValidateNever]
        [ForeignKey("PromoterId")]
        public Organization? Promoter { get; set; }
        public Guid PMCId { get; set; } = Guid.Parse("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea");

        [ValidateNever]
        [ForeignKey("PMCId")]
        public Organization? PMC { get; set; }
    }
}
