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

namespace ms_namingservice.Database.Models;

[Table("objects")]
public class Entity
{
    [Column("id_object")] [Key] public int Identifier { get; set; }

    [Column("id_parent_object")]
    [ForeignKey("id_parent_object")]
    public Entity Parent { get; set; }

    public virtual ICollection<FrameworkMetadataType> FrameworkMetadataTypes { get; set; } =
        new List<FrameworkMetadataType>();

    public virtual ICollection<Les> Leses { get; set; } = new List<Les>();
    public virtual ICollection<ObjectMetadataType> ObjectMetadataTypes { get; set; } = new List<ObjectMetadataType>();
}