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

namespace ms_useCaseService.Database.Models;

[Table("les_types_categories")]
[Index(nameof(LesTypesCategory.Identifier), IsUnique = true)]
public class LesTypesCategory
{
    [Column("id_les_type_category")]
    [Key]
    public int Identifier { get; set; }
    
    [Column("id_les_type")]
    [ForeignKey("id_les_type")]
    public LesType LesType { get; set; }
    
    [Column("les_type_category")]
    [MaxLength(128)]
    public string Category { get; set; }
    
    [Column("les_type_category_short")]
    [MaxLength(8)]
    public string ShortCategory { get; set; }

}