package com.njcn.shiro.pojo;



import com.njcn.sso.pojo.user.User;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户登录成功之后，保存在session里，方便统计所有在线的用户
 */
public class UserOnlineBo extends User implements Serializable {

	private static final long serialVersionUID = 1L;
	
	//Session Id
	private String sessionId;
	//用户昵称
	private String nickName;
	//Session Host
	private String host;
	//Session创建时间
	private Date startTime;
	//Session最后交互时间
	private Date lastAccess;
	//Session timeout
	private long timeout;
	//session 是否踢出
	private boolean sessionStatus = Boolean.TRUE;
	
	
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public UserOnlineBo() {
	}
	
	public UserOnlineBo(User user) {
		super(user);
	}
	
	
	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getLastAccess() {
		return lastAccess;
	}

	public void setLastAccess(Date lastAccess) {
		this.lastAccess = lastAccess;
	}

	public long getTimeout() {
		return timeout;
	}

	public void setTimeout(long timeout) {
		this.timeout = timeout;
	}

	public boolean isSessionStatus() {
		return sessionStatus;
	}

	public void setSessionStatus(boolean sessionStatus) {
		this.sessionStatus = sessionStatus;
	}

	@Override
	public String toString() {
		return "UserOnlineBo [sessionId=" + sessionId + ", nickName=" + nickName + ", host=" + host + ", startTime="
				+ startTime + ", lastAccess=" + lastAccess + ", timeout=" + timeout + ", sessionStatus=" + sessionStatus
				+ "]";
	}
}
