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

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

import com.eactive.eai.common.b2bservice.B2BServiceVO;
import com.eactive.eai.data.entity.onl.b2bservice.B2BService;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface B2BServiceMapper extends GenericMapper<B2BServiceVO, B2BService> {

	@Mapping(source = "id.extnlinstiidnfiname", target = "b2bExtnlInstiCd")
	@Mapping(source = "id.svcprcssno", target = "svcPssSeq")
	@Mapping(source = "psvintfacdsticname", target = "psvItfTp")
	@Mapping(source = "psvsysbzwkdstcd", target = "psvBwkSysNm")
	@Mapping(source = "psvsysidname", target = "psvSysID")
	@Mapping(source = "psvsyssvcdsticname", target = "psvSysSvcCd")
	@Mapping(source = "psvsysadptrbzwkgroupname", target = "psvSysItfTp")
	@Mapping(source = "flovryn", target = "flOvrCls")
	@Mapping(source = "chngeonot", target = "cnvEn")
	@Mapping(source = "chngmsgidname", target = "cnvMsgID")
	@Mapping(source = "bascrspnsmsgcmprctnt", target = "bsRspMsgCprVl")
	@Mapping(source = "bascrspnschngeonot", target = "bsRspCnvEn")
	@Mapping(source = "bascrspnschngmsgidname", target = "bsRspCnvMsgID")
	@Mapping(source = "errrspnsmsgcmprctnt", target = "errRspMsgCprVl")
	@Mapping(source = "errrspnschngeonot", target = "errRspCnvEn")
	@Mapping(source = "errrspnschngmsgidname", target = "errRspCnvMsgID")
	@Mapping(source = "nextsvcprcssno", target = "nxtSvcPssSeq")
	@Mapping(source = "outbndroutname", target = "outbRtnNm")
	@Mapping(source = "toutval", target = "tmoVl")
	@Mapping(source = "cmpensvcprcssdsticname", target = "cpnsSvcPssCd")
	@Mapping(source = "suppldelyn", target = "supplDelYn")
	@Mapping(source = "hdrctrldstcd", target = "hdrCtrlDstcd")
	@Mapping(source = "hdrrefclsname", target = "hdrRefClsName")
	@Mapping(source = "useyn", target = "useYn")
	@Override
	B2BServiceVO toVo(B2BService entity);

	@InheritInverseConfiguration
	@Override
	B2BService toEntity(B2BServiceVO vo);
}
