package com.eactive.eai.rms.common.acl.bizKeyTran;

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.mapper.GenericMapper;
import com.eactive.eai.rms.data.entity.man.bizKeyTran.BizKeyTran;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface BizKeyTranUIMapper extends GenericMapper<BizKeyTranUI, BizKeyTran> {

	@Override
	@Mapping(source = "eaibzwkdstcd", target = "eaiBzwkDstcd")
	@Mapping(source = "apcode", target = "apCode")
	BizKeyTranUI toVo(BizKeyTran entity);

	@Override
	@InheritInverseConfiguration
	BizKeyTran toEntity(BizKeyTranUI vo);

	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(BizKeyTranUI bizKeyTranUI, @MappingTarget BizKeyTran bizKeyTran);
}
