package com.eactive.eai.rms.common.property.mapper;

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

import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.common.property.UI.MonitoringPropertyUI;
import com.eactive.eai.rms.data.entity.man.monitoringProperty.MonitoringProperty;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface MonitoringPropertyMapper extends GenericMapper<MonitoringPropertyUI, MonitoringProperty>{

	@Mapping(source = "prptyGroupName", target = "id.prptyGroupName")
	@Mapping(source = "prptyName", target = "id.prptyName")
	@Override
	MonitoringProperty toEntity(MonitoringPropertyUI vo);

	@InheritInverseConfiguration
	@Override
	MonitoringPropertyUI toVo(MonitoringProperty entity);
	
}
