package com.engine.secret.entity.unpack;

import com.engine.secret.util.ModeUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

/**
 * @author:dxfeng
 * @createTime: 2025/03/26
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DataConfigDetail {
    private String fieldName;
    private String path;
    private String condition;
    private String convertSql;

    public String getConvertSql() {
        if (StringUtils.isBlank(convertSql)) {
            return "";
        }
        return ModeUtil.ToDBC(convertSql);
    }
}
