package com.fzm.mall.server.admin.enums.log;

/**
 * @author wangp
 * @date 2021/3/1 18:31
 * @description 操作模块
 * @since JDK 1.8
 */
public enum OperateModuleEnum {

    HOME_PAGE(1, "首页"),
    GOODS_CENTER(2, "商品中心"),
    ORDER_CENTER(3, "订单中心"),
    SHOP_CENTER(4, "店铺中心"),
    OPERATE_CENTER(5, "运营中心"),
    DISTRIBUTION_CENTER(6, "物流中心"),
    MESSAGE_CENTER(7, "消息中心"),
    CUSTOMER_SERVICE_CENTER(8, "客服中心"),
    USER_CENTER(9, "用户中心"),
    FINANCE_CENTER(10, "财务中心"),
    AUTH_CENTER(11, "权限中心"),
    DATA_CENTER(12, "数据中心"),
    SYSTEM_CENTER(13, "系统中心");

    private Integer module;
    private String text;

    OperateModuleEnum(Integer module, String text) {
        this.module = module;
        this.text = text;
    }

    public Integer getModule() {
        return module;
    }

    public String getText() {
        return text;
    }

    public static OperateModuleEnum getByModule(Integer module) {
        for (OperateModuleEnum v : values()) {
            if (v.module.equals(module)) {
                return v;
            }
        }
        return null;
    }

}
