package com.yeejoin.amos.latentdanger.common.enums;

/**
 * 拥有者枚举
 * @author WJK
 *
 */
public enum OwerEnum {

	/**
	 * 我的
	 */
	MY("我的","0"),
	ALL("全部","1" );


	/**
	 * 名称，描述
	 */
	private String name;
	/**
	 * 编码
	 */
	private String code;

	private OwerEnum(String name, String code){
		this.name = name;
		this.code = code;
	}

	public static OwerEnum getEnum(String code) {
		OwerEnum jPushTypeEnum = null;
		for(OwerEnum type: OwerEnum.values()) {
			if (type.getCode().equals(code)) {
				jPushTypeEnum = type;
				break;
			}
		}

		return jPushTypeEnum;
	}

	public String getName() {
		return name;
	}

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

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
