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

import com.eactive.eai.data.entity.onl.transformer.layout.LayoutItemEntity;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.loader.layout.deploy.LayoutItemDeploy;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = BaseMapperConfig.class)
public interface LayoutItemDeployMapper extends GenericMapper<LayoutItemDeploy, LayoutItemEntity> {

   @Mapping(source = "id.loutname", target = "loutname")
   @Mapping(source = "id.loutitemserno", target = "loutitemserno")
   @Mapping(source = "id.loutitemname", target = "loutitemname")
   LayoutItemDeploy toVo(LayoutItemEntity entity);

   @InheritInverseConfiguration(name = "toVo")
   LayoutItemEntity toEntity(LayoutItemDeploy vo);

}
