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

namespace Lada.Framework.Data.Mappings.DbContexts
{
    public partial class LadaDbContext
    {
        // Premise DbSets
        public virtual DbSet<Premise> Premises { get; set; }
        public virtual DbSet<PremiseFinancial> PremiseFinancials { get; set; }
        public virtual DbSet<PremiseContact> PremiseContacts { get; set; }
        public virtual DbSet<PremiseScoringCriteria> PremiseScoringCriteria { get; set; }
        public virtual DbSet<PremiseScoringOption> PremiseScoringOptions { get; set; }
        public virtual DbSet<PremiseScore> PremiseScores { get; set; }
        public virtual DbSet<PremiseMedia> PremiseMedias { get; set; }

        private void ApplyPremiseMappings(ModelBuilder builder)
        {
            builder
                .RegisterEntityMapping<Premise, PremiseMap>()
                .RegisterEntityMapping<PremiseFinancial, PremiseFinancialMap>()
                .RegisterEntityMapping<PremiseContact, PremiseContactMap>()
                .RegisterEntityMapping<PremiseScoringCriteria, PremiseScoringCriteriaMap>()
                .RegisterEntityMapping<PremiseScoringOption, PremiseScoringOptionMap>()
                .RegisterEntityMapping<PremiseScore, PremiseScoreMap>()
                .RegisterEntityMapping<PremiseMedia, PremiseMediaMap>();
        }
    }
}
