package com.eactive.eai.custom.stderrorcode.mapper;

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

import com.eactive.eai.custom.stderrorcode.ChannelErrorCodeVO;
import com.eactive.eai.data.entity.custom.stderrorcode.ChannelErrorCode;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ChannelErrorCodeMapper extends GenericMapper<ChannelErrorCodeVO, ChannelErrorCode> {

	   @Mapping(source = "STD_ERR_CD", target = "errCd") //표준오류코드
	   @Mapping(source = "CHNL_ERR_CD", target = "channelErrCd") //채널오류코드
	   @Mapping(source = "CHNL_DTLS_CLCD", target = "type") //채널세부코드
	   @Mapping(source = "CHNL_ERR_MSG_CTS", target = "errMsg") //채널오류메시니내용
	   @Override
	   ChannelErrorCodeVO toVo(ChannelErrorCode entity);
}
