package com.fdkankan.common.constant;

public enum SceneStatus {

    wait(0, "未建好"),
    SUCCESS(1, "已建好"),
    FAILD(-1, "出错"),
    NO_DISPLAY(-2, "不要在官网上显示"),
    EXCEED_SPACE(-3, "超出容量，未计算"),
    PREVIEW(6, "可预览")
    ;

    private Integer code;
    private String message;

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

    public Integer code() {
        return code;
    }

    public String message() {
        return message;
    }

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

}
