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 OptGroupStatus implements IEnumCombobox {

	DEL("已删除"), MOV("已移动"), UNUSE("未启用");
	private final String desc;

	private OptGroupStatus(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 OptGroupStatus find(String name) {
		if (StringUtils.isEmpty(name)) {
			return null;
		}
		for (OptGroupStatus ele : OptGroupStatus.values()) {
			if (name.equalsIgnoreCase(ele.name())) {
				return ele;
			}
		}
		return null;
	}

}
