package com.fdkankan.common.constant;

/**
 * 场景来源
 */
public enum SceneFrom {

    LITE("lite ", "双目lite相机"),
    PRO("pro", "八目相机 "),
    MINION("minion", "双面转台相机"),
    LASER("laser", "激光相机"),
    SXZ("sxz", "SXZ虚拟场景")
    ;

    private String code;
    private String message;

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

    public String code() {
        return code;
    }

    public String message() {
        return message;
    }

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

}
