package com.eactive.eai.rms.onl.manage.inflow.group;

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

import com.eactive.eai.data.entity.onl.inflow.InflowControlGroup;
import com.eactive.eai.data.entity.onl.inflow.InflowControlGroupMapping;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface InflowGroupControlManMapper {

	InflowGroupControlManUI toVo(InflowControlGroup entity);

	InflowControlGroup toEntity(InflowGroupControlManUI vo);

	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(InflowGroupControlManUI vo, @MappingTarget InflowControlGroup entity);

	// Mapping Entity <-> UI
	InflowGroupMappingUI toMappingVo(InflowControlGroupMapping entity);

	InflowControlGroupMapping toMappingEntity(InflowGroupMappingUI vo);

	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToMappingEntity(InflowGroupMappingUI vo, @MappingTarget InflowControlGroupMapping entity);
}
