package com.org.hktshop.Enums;

public enum MoudleEnum {

    MOUDLE_TYPE(1, "商品模块");

    private final Integer code;
    private final String name;

    MoudleEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static int getMoudleType(String name){
        for(MoudleEnum me : MoudleEnum.values()){
            if(me.getName().equals(name)){
                return me.getCode();
            }
        }
        return -1;
    }
}
