package com.eactive.eai.common.circuitBreaker.type;

import com.eactive.eai.data.entity.onl.circuitbreaker.CircuitBreakerConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TypedCircuitBreakerMapper extends GenericMapper<TypedCircuitBreakerVO, CircuitBreakerConfig> {
	@Mappings({
		@Mapping(source = "cbreakerId", target = "id"), 
		@Mapping(source = "cbreakerName", target = "name"), 
		@Mapping(source = "cbreakerDesc", target = "desc"),
		@Mapping(source = "cbreakerType", target = "type"),
		})
	TypedCircuitBreakerVO toVo(CircuitBreakerConfig var1);

	@InheritInverseConfiguration
	CircuitBreakerConfig toEntity(TypedCircuitBreakerVO var1);
}