package com.judong.chuanyiserver.enums;

public enum ModelEnum {

    UNKNOWN("未知模块", "UNKNOWN"),

    USER("用户管理", "USER"), ROLE("角色管理", "ROLE"), BASIC_DATA("基础数据", "BASIC_DATA"), MENU("菜单管理", "MENU"),
    DEPT("组织机构管理", "DEPT"), GROUP("用户组管理", "GROUP"), PERSON("人员管理", "PERSON"),
    MOBILE("移动端", "MOBILE"),
    WEBSITE("站点管理", "WEBSITE"),
    COLUMN("栏目管理", "COLUMN"),

    SIGNIN("登录", "SIGNIN"), LOGOUT("退出登录", "LOGOUT"), REGISTER("注册", "REGISTER"), HOMEBYPAGE("首页", "HOMEBYPAGE"),
    UPDATECODE("发送验证码", "UPDATECODE"), SEARCH("房源搜索", "SEARCH");

    private String value;

    private String name;

    private ModelEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getName(String name) {
        for (ModelEnum c : ModelEnum.values()) {
            if (c.getName().equalsIgnoreCase(name)) {
                return c.value;
            }
        }
        return "";
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
