package com.ywt.mg.domain.models.enums;

/**
 * 资讯类型(对应mg_right_rels表里面的type字段)
 */
public enum MgRightRelsTypeEnum {
    UNKNOWN("",0),
    Menu("菜单", 1),
    Right("权限点", 2);

    private final String displayName;

    private final int value;

    MgRightRelsTypeEnum(String displayName, int value){
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static MgRightRelsTypeEnum valueOf (int value){
        switch (value){
            case 1:
                return Menu;
            case 2:
                return Right;
            default:
                return UNKNOWN;
        }
    }


}
