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.Forum
{
    public class TicketForum : TenantRelation
    {
        public Guid Id { get; set; }
        public string Subject { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public Guid StatusId { get; set; }
        [ValidateNever]
        [ForeignKey(nameof(StatusId))]
        public TicketStatusMaster? TicketStatusMaster { get; set; }
        public Guid TypeId { get; set; }         // QualityIssue, HelpDesk, Feedback
        [ValidateNever]
        [ForeignKey(nameof(TypeId))]
        public TicketTypeMaster? TicketTypeMaster { get; set; }
        public Guid CreatedById { get; set; }
        public DateTime CreatedAt { get; set; }

        public Guid? LinkedProjectId { get; set; }
        public Guid? LinkedActivityId { get; set; } // task or project ID

        //public ICollection<TicketComment>? Comments { get; set; } // view model
        //public ICollection<TicketAttachment>? Attachments { get; set; } // view model

        public Guid PriorityId { get; set; }
        [ValidateNever]
        [ForeignKey(nameof(PriorityId))]
        public TicketPriorityMaster? Priority { get; set; }

        //public ICollection<TicketTag>? Tags { get; set; }  // view model
    }

}
