package com.platform.modules.live.utils;

import org.apache.commons.lang.StringUtils;

/**
 * Created by TROY on 2019/2/16.
 */
public enum LuceneTypeEnum {
	/**
	 * 现场
	 */
	LUCENE_SCENE("scene"),
	/**
	 * 报道
	 */
	LUCENE_REPORT("report");

	private String type;

	LuceneTypeEnum(String type) {
		this.type = type;
	}

	public static boolean contain(String type) {
		if (StringUtils.isBlank(type)) {
			return false;
		}
		for (LuceneTypeEnum typeEnum : LuceneTypeEnum.values()) {
			if (typeEnum.getType().equals(type)) {
				return true;
			}
		}
		return false;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
