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

namespace ms_useCaseService.Database.Models;

[Table("les_types")]
[Index(nameof(LesType.Identifier), IsUnique = true)]
[Index(nameof(LesType.Type), IsUnique = true)]
[Index(nameof(LesType.ShortType), IsUnique = true)]
public class LesType
{
    [Column("id_les_type")]
    [Key]
    public int Identifier { get; set; }
    
    [Column("les_type")]
    [MaxLength(32)]
    public string Type { get; set; }
    
    [Column("les_type_short")]
    [MaxLength(8)]
    public string ShortType { get; set; }
}