package com.fdkankan.common.constant;

/**
 * 场景详情请求来源
 */
public enum SceneInfoReqType {

    EDIT((byte)1, "编辑页面"),
    VIEW((byte)2, "查看页面");

    private Byte code;
    private String message;

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

    public Byte code() {
        return code;
    }

    public String message() {
        return message;
    }

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

}
