using AutoMapper;
using Lada.Framework.Data.Domains.Trucks;
using Ladaer.BackEnd.Infrastructures.DTO.Items.Trucks;
using Ladaer.BackEnd.Infrastructures.DTO.Models.Trucks;

namespace Ladaer.BackEnd.Infrastructures.DTO.Profiles
{
    /// <summary>
    /// AutoMapper profile cho các ánh xạ liên quan đến Truck.
    /// </summary>
    public class TruckMappingProfile : Profile
    {
        public TruckMappingProfile()
        {
            // Truck mappings
            CreateMap<Truck, TruckModel>();
            CreateMap<TruckModel, Truck>();
            CreateMap<Truck, TruckItem>();

            // TruckActivity mappings
            CreateMap<TruckActivity, TruckActivityItem>();
            CreateMap<TruckActivityModel, TruckActivity>();

            // TruckAsset mappings
            CreateMap<TruckAsset, TruckAssetItem>();
            CreateMap<TruckAssetModel, TruckAsset>();

            // TruckSpecAttribute mappings
            CreateMap<TruckSpecAttribute, TruckSpecAttributeItem>();
            CreateMap<TruckSpecAttributeModel, TruckSpecAttribute>();

            // TruckMaintAttribute mappings
            CreateMap<TruckMaintAttribute, TruckMaintAttributeItem>();
            CreateMap<TruckMaintAttributeModel, TruckMaintAttribute>();

            // TruckMaintLink mappings
            CreateMap<TruckMaintLink, TruckMaintLinkItem>();
            CreateMap<TruckMaintLinkModel, TruckMaintLink>();

            // TruckMaintenance mappings
            CreateMap<TruckMaintenance, TruckMaintenanceItem>();
            CreateMap<TruckMaintenanceModel, TruckMaintenance>();

            // TruckSpecification mappings
            CreateMap<TruckSpecification, TruckSpecificationItem>();
            CreateMap<TruckSpecificationModel, TruckSpecification>();
        }
    }
}
