package com.sckw.core.common.enums.enums;
/**
 * @author lfdc
 * @version 1.0
 * @className FileEnum
 * @description 文件上传保存地址
 * @company sckw
 * @date 2023-06-02 16:06:43
 */
public enum FileEnum {


    /**
     * 本地存储地址
     */
    Local_Address("1","/image", "本地上传保存地址"),
    /**
     * 用户存储地址
     */
    User_Address("2","/user", "用户存储地址"),
    /**
     * 企业存储地址
     */
    Enterprise_Address("3","/enterprise", "企业存储地址"),
    /**
     * 合同存储地址
     */
    CONTRACT_ADDRESS("4","/contract", "合同存储地址"),
    /**
     * 文件存储地址
     */
    DOCUMENT_ADDRESS("5","/excel", "文件存储地址"),

    /**
     * 文件存储方式-上传oss
     */
    FILE_STORE_TYPE_OSS("OSS","OSS","上传OSS"),
    /**
     文件存储方式-上传七牛云
     *
     */
    FILE_STORE_TYPE_ALIYUN("kodo","qiniuyun","上传七牛云");

    private final String fileType;
    private final String fileAddress;
    private final String fileDescription;

    public String getFileType() {
        return fileType;
    }

    public String getFileAddress() {
        return fileAddress;
    }

    public String getFileDescription() {
        return fileDescription;
    }

    FileEnum(String fileType, String fileAddress, String fileDescription) {
        this.fileType = fileType;
        this.fileAddress = fileAddress;
        this.fileDescription = fileDescription;
    }




    public static String getValue(String fileType) {
        for (FileEnum ele : FileEnum.values()) {
            if (ele.getFileType().equals(fileType)) {
                return ele.getFileAddress();
            }
        }
        return null;
    }

}
