using Lada.Framework.Data.Domains.Crm;
using Lada.Framework.Data.Mappings.EntityMappings.Crm;
using Microsoft.EntityFrameworkCore;

namespace Lada.Framework.Data.Mappings.DbContexts
{
    public partial class LadaDbContext
    {
        // CRM DbSets
        public virtual DbSet<VatInfo> VatInfos { get; set; }

        private void ApplyCrmMappings(ModelBuilder builder)
        {
            builder
                .RegisterEntityMapping<Customer, CustomerMap>()
                .RegisterEntityMapping<CustomerAddress, CustomerAddressMap>()
                .RegisterEntityMapping<CustomerBankAccount, CustomerBankAccountMap>()
                .RegisterEntityMapping<Lead, LeadMap>()
                .RegisterEntityMapping<CallLog, CallLogMap>()
                .RegisterEntityMapping<VatInfo, VatInfoMap>()

                ;
        }
    }
}
