using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace ms_lesService.Database.Models;

[Table("framework_metadata_types")]
[Index(nameof(FrameworkMetadataType.Identifier), IsUnique = true)]
public class FrameworkMetadataType
{
    [Column("id_framework_metadata_type")]
    [Key]
    public int Identifier { get; set; }
    
    [Column("framework_metadata_type")]
    [MaxLength(128)]
    public string Type { get; set; }

    public virtual ICollection<FrameworkType> FrameworkTypes { get; set; } = new List<FrameworkType>();
    public virtual ICollection<Entity> Objects { get; set; } = new List<Entity>();
}