package com.eactive.eai.rms.onl.manage.control.history;

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

import com.eactive.eai.data.entity.onl.restrict.RestrictInfoHistory;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ControlHistoryManMapper extends GenericMapper<ControlHistoryManUI, RestrictInfoHistory> {
	@Override
	ControlHistoryManUI toVo(RestrictInfoHistory entity);

	@Override
	@InheritInverseConfiguration
	RestrictInfoHistory toEntity(ControlHistoryManUI vo);

	ControlHistoryManUI toVo(ControlHistoryServiceDto dto);
	
	@Mapping(target = "eaictrlname", source = "id.eaictrlname")
	@Mapping(target = "ctrlprcssyms", source = "id.ctrlprcssyms")
    ControlHistoryServiceDto toDto(RestrictInfoHistory entity);

}
