package org.dromara.common.core.config;

import org.dromara.common.core.config.properties.BoManProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: tjf
 * @Date: 2025/4/8 17:44
 * @Describe:
 */
@Component
public class BoManConfig {
    private static BoManProperties boManProperties;

    @Autowired
    public BoManConfig(BoManProperties boManProperties) {
        this.boManProperties = boManProperties;
    }

    /**
     * 获取导入上传路径
     */
    public static String getImportPath() {
        return boManProperties.getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath() {
        return boManProperties.getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath() {
        return boManProperties.getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath() {
        return boManProperties.getProfile() + "/upload";
    }

    /**
     * 获取原始上传路径
     */
    public static String getProfile() {
        return boManProperties.getProfile();
    }

    /**
     * 获取用手机号,短信验证码注册账号的默认密码
     */
    public static String getPasswordDeft() {
        return boManProperties.getPasswordDeft();
    }
}
