package com.eactive.eai.rms.onl.manage.serviceinfo.b2bservice;

import org.mapstruct.BeanMapping;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;

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

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
public interface B2bServiceManMapper extends GenericMapper<B2bServiceUI, B2BService> {
	@Override
	@Mapping(target = "extnlInstiIdnfiName", source = "id.extnlinstiidnfiname")
    @Mapping(target = "svcPrcssNo", source = "id.svcprcssno")
    @Mapping(target = "adptrBzwkGroupDesc", source = "adptrbzwkgroupdesc")
    @Mapping(target = "bascRspnsChngEonot", source = "bascrspnschngeonot")
    @Mapping(target = "bascRspnsChngMsgIdName", source = "bascrspnschngmsgidname")
    @Mapping(target = "bascRspnsMsgCmprCtnt", source = "bascrspnsmsgcmprctnt")
    @Mapping(target = "chngEonot", source = "chngeonot")
    @Mapping(target = "chngMsgIdName", source = "chngmsgidname")
    @Mapping(target = "cmpenSvcPrcssDsticName", source = "cmpensvcprcssdsticname")
    @Mapping(target = "eaiLastAmndyms", source = "eailastamndyms")
    @Mapping(target = "eaiSevrDstCd", source = "eaisevrdstcd")
    @Mapping(target = "errRspnsChngEonot", source = "errrspnschngeonot")
    @Mapping(target = "errRspnsChngMsgIdName", source = "errrspnschngmsgidname")
    @Mapping(target = "errRspnsMsgCmprCtnt", source = "errrspnsmsgcmprctnt")
    @Mapping(target = "flovrYn", source = "flovryn")
    @Mapping(target = "hdrCtrlDstcd", source = "hdrctrldstcd")
    @Mapping(target = "hdrRefClsName", source = "hdrrefclsname")
    @Mapping(target = "modfiMgtStusDstCd", source = "modfimgtstusdstcd")
    @Mapping(target = "nextSvcPrcssNo", source = "nextsvcprcssno")
    @Mapping(target = "outbndRoutName", source = "outbndroutname")
    @Mapping(target = "psvIntfacDsticName", source = "psvintfacdsticname")
    @Mapping(target = "psvSysAdptrBzwkGroupName", source = "psvsysadptrbzwkgroupname")
    @Mapping(target = "psvSysBzwkDstcd", source = "psvsysbzwkdstcd")
    @Mapping(target = "psvSysIdName", source = "psvsysidname")
    @Mapping(target = "psvSysSvcDsticName", source = "psvsyssvcdsticname")
    @Mapping(target = "supplDelYn", source = "suppldelyn")
    @Mapping(target = "toutVal", source = "toutval")
    @Mapping(target = "useYn", source = "useyn")
    B2bServiceUI toVo(B2BService entity);

	@Override
	@InheritInverseConfiguration
	B2BService toEntity(B2bServiceUI vo);

	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(B2bServiceUI vo, @MappingTarget B2BService entity);
}
