package com.zhongshu.card.client.type.oss;

import lombok.Getter;

/**
 * 平台存储路径常量
 */
public enum PlatformStoreType {


    //所有文件都存在这一级后面
    Store("store", "存储"),

    //预览文件存储
    PreView("preview", "预览"),

    ;

    PlatformStoreType(String path, String remark) {
        this.path = path;
        this.remark = remark;
    }

    @Getter
    private String path;

    @Getter
    private String remark;


    /**
     * 通过路径查询类型
     *
     * @param path
     * @return
     */
    public static PlatformStoreType valueOfPath(String path) {
        for (PlatformStoreType storeType : PlatformStoreType.values()) {
            if (storeType.getPath().equals(path)) {
                return storeType;
            }
        }
        return null;
    }


}
