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

namespace Lada.Framework.Data.Mappings.EntityMappings.Orders
{
    public class OrderFinMap : IEntityMappingConfiguration<OrderFin>
    {
        public void Map(EntityTypeBuilder<OrderFin> builder)
        {
            builder.HasKey(o => o.Id);
            builder.Property(o => o.Id).ValueGeneratedNever(); // Id is not auto-generated, it's a FK
            builder.ToTable("OrderFin");
        }
    }
}
