package com.smppw.common.pojo.enums;

import java.util.stream.Stream;

/**
 * @author zhengsongliang
 */
public enum Visibility {
	Visible(1), Invisible(0), Both(2);
	private int id;

	private Visibility(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public static Visibility getVisibility(int id) {
		return Stream.of(Visibility.values()).filter(e -> e.id == id).findFirst().orElse(null);
	}
}
