package com.uas.platform.b2b.model;

import java.io.Serializable;

/**
 * 登录后，获取的认证信息
 */
public class AuthInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long uu;
	private String name;
	private Long enUU;
	private String enName;
	private String type;
	private String enUrl;
	/**
	 * 上次登录的日志
	 */
	private SigninLog lastSigninLog;

	public AuthInfo(User user) {
		this.uu = user.getUserUU();
		this.name = user.getUserName();
		this.type = user.getUserType();
		Enterprise enterprise = user.getEnterprise();
		if (enterprise != null) {
			this.enUU = enterprise.getUu();
			this.enName = enterprise.getEnName();
			this.enUrl = enterprise.getEnUrl();
		}
	}
	
	public AuthInfo(User user, SigninLog signinLog) {
		this(user);
		this.lastSigninLog = signinLog;
	}

	public Long getUu() {
		return uu;
	}

	public void setUu(Long uu) {
		this.uu = uu;
	}

	public String getName() {
		return name;
	}

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

	public Long getEnUU() {
		return enUU;
	}

	public void setEnUU(Long enUU) {
		this.enUU = enUU;
	}

	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	public String getType() {
		return type;
	}

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

	public String getEnUrl() {
		return enUrl;
	}

	public void setEnUrl(String enUrl) {
		this.enUrl = enUrl;
	}

	public SigninLog getLastSigninLog() {
		return lastSigninLog;
	}

	public void setLastSigninLog(SigninLog lastSigninLog) {
		this.lastSigninLog = lastSigninLog;
	}

}
