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

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

import com.eactive.eai.common.b2bextractor.B2BExtractVO;
import com.eactive.eai.data.entity.onl.b2bextractor.B2BExtract;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface B2BExtractMapper extends GenericMapper<B2BExtractVO, B2BExtract> {

	@Mapping(source = "id.eaisvcname", target = "eaiSvcCd")
	@Mapping(source = "id.svcprcssno", target = "svcPssSeq")
	@Mapping(source = "svcroutclsname", target = "routeActionName")
	@Mapping(source = "adptrroutclsname", target = "adapterActionName")
	@Override
	B2BExtractVO toVo(B2BExtract entity);

	@InheritInverseConfiguration
	@Override
	B2BExtract toEntity(B2BExtractVO vo);
}
