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

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

import com.eactive.eai.common.message.EAIMessage;
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(config = BaseMapperConfig.class, uses = ServiceMessageMapper.class)
public interface EAIMessageMapper extends GenericMapper<EAIMessage, EAIMessageEntity> {

	@Mapping(source = "eaisvcname", target = "EAISvcCd")
	@Mapping(source = "eaibzwkdstcd", target = "bwkCls")
	@Mapping(source = "svchmseonot", target = "svcTmEn")
	@Mapping(source = "svcmotivusedstcd", target = "svcTsmtUsgTp")
	@Mapping(source = "svcprcesdsticname", target = "svcPssTp")
	@Mapping(source = "flowctrlroutname", target = "flwCntlRtnNm")
	@Mapping(source = "intgradsticname", target = "unifTp")
	@Mapping(source = "svcbfclmnlogyn", target = "svcWlColLogYn")
	@Mapping(source = "gstatsysadptrbzwkgroupname", target = "sngSysItfTp")
	@Mapping(source = "sevrloglvelno", target = "svrLogLvl")
	@Mapping(source = "svcloglvelno", target = "svcLogLvl")
	@Mapping(source = "erreaisvcname", target = "errEAISvcName")
	@Mapping(source = "dmnderrchngidname", target = "dmndErrChngIDName")
	@Mapping(source = "dmnderrfldname", target = "dmndErrFldName")
	@Mapping(source = "rspnserrchngidname", target = "rspnsErrChngIDName")
	@Mapping(source = "rspnserrfldname", target = "rspnsErrFldName")
	@Mapping(source = "eaisvcdesc", target = "EAISvcDesc")
	@Mapping(source = "eaisevrdstcd", target = "sevrDstcd")
	@Mapping(source = "eaigroupcocd", target = "groupCoCd")
	@Mapping(source = "trantype", target = "tranType")
	@Mapping(source = "useyn", target = "useYn")
	@Mapping(source = "txid", target = "txId")
	@Mapping(source = "refkey", target = "refKey")
	@Mapping(source = "extbizcd", target = "extBizCd")
	@Mapping(source = "internalexternaldvcd", target = "internalExternalDvcd")
	@Mapping(source = "apienabledyn", target = "apiEnabledYn")
	@Mapping(source = "authtype", target = "authType")
	@Mapping(source = "serviceMessages", target = "svcMsgs")
	@Mapping(source = "apicacheyn", target = "apiCacheYn")
	@Mapping(source = "apicachetype", target = "apiCacheType")
	@Mapping(source = "authcheckdyn", target = "authCheckdYn")
	@Override
	EAIMessage toVo(EAIMessageEntity entity);

	@InheritInverseConfiguration
	EAIMessageEntity toEntity(EAIMessage vo);

}
