package com.fdkankan.common.constant;

/**
 * 文件业务类型
 */
public enum FileBizType {

    FLOOR_LOGO("floorLogo", "地板logo"),
    MUSIC("music", "背景音乐"),
    FLOOR_PLAN("floorPlan", "户型图"),
    SCREENSHOT("screenshot", "初始画面"),
    BOX_VIDEO("box-video", "视频"),
    TAG_ICON("tag-icon", "热点图标"),
    LINK_STYLE("link-style", "场景关联图标"),
    WATERMARK("waterMark", "水印"),
    BOX_POSTER("box-poster", "空间视频封面图"),
    BILLBOARD_ICON("billboard-icon", "指示牌"),

    CUT_MODEL("cutModel", "模型裁剪"),
    ;

    private String code;
    private String message;

    private FileBizType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String code() {
        return code;
    }

    public String message() {
        return message;
    }

    public static FileBizType get(String code){
        FileBizType[] values = FileBizType.values();
        String enumValue = null;
        for(FileBizType eachValue : values){
            enumValue = eachValue.code();
            if(enumValue.equals(code)){
                return eachValue;
            }
        }
        return null;
    }

}
