package com.platform.modules.live.utils;

/**
 * Created by TROY on 2019/2/16.
 */
public enum ReportReleaseEnum {
	/**
	 * 草稿
	 */
	DRAFT("草稿", -1),
	/**
	 * 未发布
	 */
	UNRELEASED("未发布", 0),
	/**
	 * 已发布
	 */
	RELEASED("已发布", 1);

	private String name;
	private Integer key;

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

	public static String getName(Integer key) {
		for (ReportReleaseEnum type : ReportReleaseEnum.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;
	}
}
