package com.ruoyi.common.third.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = EncryptProperties.ENCRYPT_PREFIX)
public class EncryptProperties {
    public final static String ENCRYPT_PREFIX = "third-switch.mp.encrypt";

    /***是否开启数据库加密*/
    private boolean enable = false;

    private String encryptKey = "73022891f0f1f12fc7152290091073b1";

    /**
     * 是否允许将历史明文数据刷为密文
     * */
    private boolean enableRefreshHistoryData = false;

    /**
     * 开启加密后，历史明文数据刷为加密,每次刷新数据量步长
     * */
    private Long refreshDataStep = 50L;

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public String getEncryptKey() {
        return encryptKey;
    }

    public void setEncryptKey(String encryptKey) {
        this.encryptKey = encryptKey;
    }

    public boolean isEnableRefreshHistoryData() {
        return enableRefreshHistoryData;
    }

    public void setEnableRefreshHistoryData(boolean enableRefreshHistoryData) {
        this.enableRefreshHistoryData = enableRefreshHistoryData;
    }

    public Long getRefreshDataStep() {
        return refreshDataStep;
    }

    public void setRefreshDataStep(Long refreshDataStep) {
        this.refreshDataStep = refreshDataStep;
    }
}
