package it.micegroup.gestioneferie.configurazionepf.config;

import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.modelmapper.convention.MatchingStrategies;

import it.micegroup.gestioneferie.libs.converter.BeanConverter;
import it.micegroup.gestioneferie.configurazionepf.dto.DregolePianiFeriePkDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DregolePianiFeriePk;
import it.micegroup.gestioneferie.configurazionepf.dto.DregolePianiFerieHDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DregolePianiFerieH;
import it.micegroup.gestioneferie.configurazionepf.dto.DpercAutPianFeriePkDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DpercAutPianFeriePk;
import it.micegroup.gestioneferie.configurazionepf.dto.DpercAutPianFerieHDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DpercAutPianFerieH;
import it.micegroup.gestioneferie.configurazionepf.dto.DconfigPaPianiFerieDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DconfigPaPianiFerie;
import it.micegroup.gestioneferie.configurazionepf.dto.DconfigPaPfUoHDto;
import it.micegroup.gestioneferie.configurazionepf.entity.DconfigPaPfUoH;

@Configuration
public class MapperConfig {
	@Bean
	public ModelMapper modelMapper() {
		ModelMapper result = new ModelMapper();
		result.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
		result.addConverter(new BeanConverter<DregolePianiFeriePkDto, DregolePianiFeriePk>());
		result.addConverter(new BeanConverter<DregolePianiFeriePk, DregolePianiFeriePkDto>());
		result.addConverter(new BeanConverter<DregolePianiFerieHDto, DregolePianiFerieH>());
		result.addConverter(new BeanConverter<DregolePianiFerieH, DregolePianiFerieHDto>());
		result.addConverter(new BeanConverter<DpercAutPianFeriePkDto, DpercAutPianFeriePk>());
		result.addConverter(new BeanConverter<DpercAutPianFeriePk, DpercAutPianFeriePkDto>());
		result.addConverter(new BeanConverter<DpercAutPianFerieHDto, DpercAutPianFerieH>());
		result.addConverter(new BeanConverter<DpercAutPianFerieH, DpercAutPianFerieHDto>());
		result.addConverter(new BeanConverter<DconfigPaPianiFerieDto, DconfigPaPianiFerie>());
		result.addConverter(new BeanConverter<DconfigPaPianiFerie, DconfigPaPianiFerieDto>());
		result.addConverter(new BeanConverter<DconfigPaPfUoHDto, DconfigPaPfUoH>());
		result.addConverter(new BeanConverter<DconfigPaPfUoH, DconfigPaPfUoHDto>());
		return result;
	}
}

