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

namespace Lada.Framework.Data.Mappings.EntityMappings.Categories
{
    public class EndPointsMap : IEntityMappingConfiguration<EndPoints>
    {
        public void Map(EntityTypeBuilder<EndPoints> builder)
        {
            builder.HasKey(a => a.Id);
            builder.HasIndex(a => new { a.StartId, a.EndId }).IsUnique();
            builder.ToTable("EndPoints");
        }
    }
}
