package com.eactive.eai.common.routing.mapper;

import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;

import com.eactive.eai.common.routing.RoutingVO;
import com.eactive.eai.data.entity.onl.routing.Routing;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface RoutingMapper extends GenericMapper<RoutingVO, Routing> {
	@Mapping(source = "id", target = "name")
	@Mapping(source = "layerdstcd", target = "layerDstcd")
	@Mapping(source = "motivrouturiname", target = "syncRoutingPath")
	@Mapping(source = "nonmotivrouturiname", target = "asynRoutingPath")
	@Override
	RoutingVO toVo(Routing entity);
	
	@InheritInverseConfiguration
	Routing toEntity(RoutingVO vo);	
}
