package com.eactive.eai.rms.onl.loader.transform.mapper;

import com.eactive.eai.data.entity.onl.transformer.transform.TransformEntity;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.loader.transform.deploy.TransformDeploy;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = BaseMapperConfig.class, uses = { TransformTypeDeployMapper.class, TransformItemDeployMapper.class })
public interface TransformDeployMapper extends GenericMapper<TransformDeploy, TransformEntity> {

   @Mapping(source = "transformTypeEntities", target = "transformTypes")
   @Mapping(source = "transformItemEntities", target = "transformItems")
   TransformDeploy toVo(TransformEntity entity);

   @InheritInverseConfiguration(name = "toVo")
   TransformEntity toEntity(TransformDeploy vo);

}
