package com.qqchen.deploy.backend.deploy.converter;

import com.qqchen.deploy.backend.deploy.dto.DeployAppConfigDTO;
import com.qqchen.deploy.backend.deploy.entity.DeployAppConfig;
import com.qqchen.deploy.backend.framework.converter.BaseConverter;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;

/**
 * 应用配置转换器
 */
@Mapper(config = BaseConverter.class, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface DeployAppConfigConverter extends BaseConverter<DeployAppConfig, DeployAppConfigDTO> {
    
    @Override
    @Mapping(target = "formVariablesSchema", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    void updateEntity(@MappingTarget DeployAppConfig entity, DeployAppConfigDTO dto);
}