using Lada.Framework.Data.Domains.Cms;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Lada.Framework.Data.Mappings.EntityMappings.Cms
{
    public class TagMap : IEntityMappingConfiguration<Tag>
    {
        public void Map(EntityTypeBuilder<Tag> builder)
        {
            builder.HasKey(a => a.Id);
            
            builder.HasIndex(t => t.Name).IsUnique();
            builder.ToTable("Tag");
        }
    }
}
