using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ms_namingservice.Database.Models;

namespace DatabaseApp.Models;

[Table("rules")]
public class Rule
{
    [Key] [Column("id_rule")] public int Identifier { get; set; }

    [Column("id_object")]
    [ForeignKey("id_object")]
    public Entity Object { get; set; }

    [Column("id_rule_type")]
    [ForeignKey("id_rule_type")]
    public RuleType RuleType { get; set; }

    public virtual ICollection<RulesMetadataType> RulesMetadataTypes { get; set; }
}