package com.hfkj.common.security;

import org.apache.commons.lang3.StringUtils;

public class SessionObject {

	/**
	 * 登录用户的唯一标识
	 */
	private String uniqueCode;

	/**
	 * 1:会员；2：渠道；3.管理员
	 */
	private Integer type;

	/**
	 * 存储用户基本信息
	 */
	private Object object;

	public SessionObject(){
		
	}
	public SessionObject(String uniqueCode, Integer type, Object object){
		this.uniqueCode = uniqueCode;
		this.type = type;
		this.object = object;
	}
	
	public String getUniqueCode() throws Exception {
		if(StringUtils.isEmpty(uniqueCode)){
			throw new Exception("SessionObject uniqueCode is null");
		}
		return uniqueCode;
	}

	public void setUniqueCode(String uniqueCode) {
		this.uniqueCode = uniqueCode;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}
