using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CARRE_DSS2.Models
{
    public class RiskFactor
    {

        public RiskFactor()
        {
            this.RiskEvidences = new HashSet<RiskEvidence>();
            this.Sources = new HashSet<RiskElement>();
        }

        [Key]
        [Display(Name = "Id")]
        public int Id { get; set; }

        [Display(Name = "Node")]
        public string Node { get; set; }

        [Display(Name = "Title")]
        public string Title { get; set; }

        [Display(Name = "Association type")]
        public string AssociationType { get; set; }

        public virtual ICollection<RiskEvidence> RiskEvidences { get; set; }

        [InverseProperty("ParrentRiskFactors")]
        public virtual ICollection<RiskElement> Sources { get; set; }

        public virtual RiskElement Target { get; set; }

    }
}