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

namespace Lada.Framework.Data.Mappings.DbContexts
{
    public partial class LadaDbContext
    {
        // Fuel Refill and Quota DbSets
        public virtual DbSet<FuelRefill> FuelRefills { get; set; }
        public virtual DbSet<FuelRefillMedia> FuelRefillMedias { get; set; }
        public virtual DbSet<FuelQuotaPayment> FuelQuotaPayments { get; set; }
        
        // Truck Media DbSet
        public virtual DbSet<TruckMedia> TruckMedias { get; set; }

        private void ApplyTruckMappings(ModelBuilder builder)
        {
            builder
                .RegisterEntityMapping<Truck, TruckMap>()
                .RegisterEntityMapping<TruckActivity, TruckActivityMap>()
                .RegisterEntityMapping<TruckActivityMedia, TruckActivityMediaMap>()
                .RegisterEntityMapping<TruckAsset, TruckAssetMap>()
                .RegisterEntityMapping<TruckSpecAttribute, TruckSpecAttributeMap>()
                .RegisterEntityMapping<TruckMaintAttribute, TruckMaintAttributeMap>()
                .RegisterEntityMapping<TruckMaintenance, TruckMaintenanceMap>()
                .RegisterEntityMapping<TruckMaintLink, TruckMaintLinkMap>()
                .RegisterEntityMapping<TruckSpecification, TruckSpecificationMap>()
                .RegisterEntityMapping<TruckMedia, TruckMediaMap>()

                // Fuel Refill and Quota Mappings
                .RegisterEntityMapping<FuelRefill, FuelRefillMap>()
                .RegisterEntityMapping<FuelRefillMedia, FuelRefillMediaMap>()
                .RegisterEntityMapping<FuelQuotaPayment, FuelQuotaPaymentMap>();
        }
    }
}
