package com.eactive.eai.rms.onl.manage.rule.header.mapper;

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

import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageLayoutItem;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.manage.rule.header.vo.StandardMessageLayoutItemVo;

@Mapper(config = BaseMapperConfig.class)
public interface StandardMessageLayoutItemMapper
		extends GenericMapper<StandardMessageLayoutItemVo, StandardMessageLayoutItem> {

	@Mapping(source = "itemKey.layoutName", target = "id.layoutName")
	@Mapping(source = "itemKey.itemNo", target = "id.itemNo")
	@Override
	StandardMessageLayoutItem toEntity(StandardMessageLayoutItemVo vo);

	@InheritInverseConfiguration
	@Override
	StandardMessageLayoutItemVo toVo(StandardMessageLayoutItem entity);

}
