package com.platform.modules.live.utils;

/**
 * Created by weiyan on 2019/2/27.
 */
public enum TopEnum {
	/**
	 * 未置顶
	 */
	UNTOP("未置顶", 0),
	/**
	 * 已置顶
	 */
	TOP("已置顶", 1);

	private String name;
	private Integer key;

	TopEnum(String name, Integer key) {
		this.name = name;
		this.key = key;
	}

	public static String getName(Integer key) {
		for (TopEnum type : TopEnum.values()) {
			if(type.getKey().equals(key)) {
				return type.getName();
			}
		}
		return  null;
	}

	public String getName() {
		return name;
	}

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

	public Integer getKey() {
		return key;
	}

	public void setKey(Integer key) {
		this.key = key;
	}

}
