package com.xxfc.platform.uccn.vo;

public enum TypeEnum {
    VEHICLE(1, "车型"),
    TOUR(2, "旅游"),
    CAMPSITE(3, "营地"),
    ACTIVITY(4, "活动"),
    NEWS(5, "新闻");
    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    TypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static TypeEnum getByValue(Integer value){
        for(TypeEnum typeEnum : values()){
            if (typeEnum.getCode() == value) {
                return typeEnum;
            }
        }
        return null;
    }
}
