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

namespace Marco.Pms.Model.Directory
{
    public class Contact : TenantRelation
    {
        public Guid Id { get; set; }
        //public Guid? ProjectId { get; set; }
        public string Name { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Designation { get; set; } = string.Empty;
        public string Organization { get; set; } = string.Empty;
        public string? Address { get; set; }
        public bool IsActive { get; set; } = true;
        public Guid CreatedById { get; set; }

        [ValidateNever]
        [ForeignKey("CreatedById")]
        public Employee? CreatedBy { get; set; }
        public Guid? UpdatedById { get; set; }

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

        [DisplayName("ContactCategoryId")]
        public Guid? ContactCategoryId { get; set; }
        [ValidateNever]
        [ForeignKey(nameof(ContactCategoryId))]
        public ContactCategoryMaster? ContactCategory { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime? UpdatedAt { get; set; }
    }
}
