package net.wicp.tams.app.duckula.controller.bean.constant;

import org.apache.commons.lang3.StringUtils;

import net.wicp.tams.common.constant.dic.intf.IEnumCombobox;

public enum DorisRole implements IEnumCombobox {

	BE("数据"), FE("前端");

	private final String desc;

	private DorisRole(String desc) {
		this.desc = desc;
	}

	@Override
	public String getDesc() {
		return this.desc;
	}

	@Override
	public String getDesc_en() {
		return this.desc;
	}

	@Override
	public String getDesc_zh() {
		return this.desc;
	}

	@Override
	public String getName() {
		return this.name();
	}

	public static DorisRole find(String name) {
		if (StringUtils.isEmpty(name)) {
			return null;
		}
		for (DorisRole ele : DorisRole.values()) {
			if (name.equalsIgnoreCase(ele.name())) {
				return ele;
			}
		}
		return null;
	}

}
