
package com.lideeyunji.tool.framework.yunji.component.properties;

import com.lideeyunji.tool.framework.yunji.tool.AesUtil;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * 低代码参数
 */
@ConfigurationProperties(prefix = "lideeyunji.yunji")
public class lideeYunjiProperties {

    //排除表名
    private static List<String> excludeTableNames;

    //低代码调试
    private static boolean debug;

    //aes加解密key
    private static String aesKey;

    //excel临时数据保留天数
    private static Integer excelDay=7;

    //JAVA增强生成文件地址
    private static String enhancePath="lidee-module\\lidee-module-biz\\src\\main\\java\\com\\lideeyunji\\module\\biz\\enhance";

    //是否保存请求日志
    private static boolean saveReqLog=true;
    //是否保存操作日志
    private static boolean saveOpLog=true;

    //---------------------------------------------------------------------------


    public static List<String> getExcludeTableNames() {
        return excludeTableNames;
    }

    public void setExcludeTableNames(List<String> excludeTableNames) {
        lideeYunjiProperties.excludeTableNames = excludeTableNames;
    }

    public static boolean getDebug() {
        return debug;
    }

    public void setDebug(boolean debug) {
        lideeYunjiProperties.debug = debug;
    }

    public static String getAesKey() {
        return aesKey;
    }

    public void setAesKey(String aesKey) {
        AesUtil.secretKey=aesKey;//赋值
        lideeYunjiProperties.aesKey = aesKey;
    }

    public static String getEnhancePath() {
        return enhancePath;
    }

    public void setEnhancePath(String enhancePath) {
        lideeYunjiProperties.enhancePath = enhancePath;
    }

    public static Integer getExcelDay() {
        return excelDay;
    }

    public void setExcelDay(Integer excelDay) {
        lideeYunjiProperties.excelDay = excelDay;
    }

    public static boolean isSaveReqLog() {
        return saveReqLog;
    }

    public void setSaveReqLog(boolean saveReqLog) {
        lideeYunjiProperties.saveReqLog = saveReqLog;
    }

    public static boolean isSaveOpLog() {
        return saveOpLog;
    }

    public void setSaveOpLog(boolean saveOpLog) {
        lideeYunjiProperties.saveOpLog = saveOpLog;
    }
}
