package org.springblade.flow.visual.onlinedev.common.enums;

/**
 * 查询类型
 * 
 * @author william
 * @date 2022年8月19日 下午3:09:50
 */
public enum SearchType {
	EQUAL(1, "equal"), //
	LIKE(2, "like"), //
	RANGE(3, "range");//

	private Integer value;
	private String name;

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

	public Integer getValue() {
		return value;
	}

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

	public String getName() {
		return name;
	}

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

	public static SearchType reslove(Integer value) {
		SearchType[] values = SearchType.values();
		for (SearchType val : values) {
			if (value != null && val.getValue().intValue() == value) {
				return val;
			}
		}
		return null;
	}
}
