using VentaUniformes.Domain.Entities.User;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VentaUniformes.Domain.Entities.Sale;

namespace VentaUniformes.Persistencia.Configurations
{
    public class SaleLineConfiguration
    {
        public SaleLineConfiguration( EntityTypeBuilder<SaleLineEntity> entityBuilder) {
            entityBuilder.ToTable("SaleLine");
            entityBuilder.HasKey(x => x.Id);
            entityBuilder.Property(x => x.Price).IsRequired();
            entityBuilder.Property(x => x.SaleId).IsRequired();
            entityBuilder.Property(x => x.ProductId).IsRequired();
            entityBuilder.Property(x => x.Amount).IsRequired();


        }
    }
}
