package com.eactive.eai.rms.onl.manage.authserver.scope;

import org.mapstruct.BeanMapping;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
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.onl.authserver.ScopeInfo;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ScopeUIMapper extends GenericMapper<ScopeUI, ScopeInfo> {

	@Override
	ScopeUI toVo(ScopeInfo entity);

	@Override
	@InheritInverseConfiguration
	ScopeInfo toEntity(ScopeUI vo);

	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(ScopeUI scopeUI, @MappingTarget ScopeInfo scopeInfo);

}
