package com.boman.system.api.model;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

import com.alibaba.fastjson.JSONObject;
import com.boman.domain.SysUser;

/**
 * 用户信息
 *
 * @author ruoyi
 */
public class LoginUser implements Serializable
{
    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一标识
     */
    private String token;

    /**
     * 用户名id
     */
    private Long userid;

    /**
     * 用户名
     */
    private String username;

    /**
     * 登录时间
     */
    private Long loginTime;

    /**
     * 过期时间
     */
    private Long expireTime;

    /**
     * 登录IP地址
     */
    private String ipaddr;

    /**
     * 权限列表
     */
    private Set<String> permissions;

    /**
     * 角色列表
     */
    private Set<String> roles;

    /**
     * 用户信息
     */
    private SysUser sysUser;

    /**
     * 用户变量 登录的时候塞进去的
     */
    private JSONObject userEnv;

    /**
     * 当前人所在部门以及下属部门所有人的userId
     */
    private List<Long> subDeptUserIds;

    /**
     * 当前人所在部门所有人的userId, 不包含子部门
     */
    private List<Long> deptUserIds;

    /**
     * 小程序登录的状态码
     */
    private Integer code;
    /**
     * 登录类型
     */
    private String loginType;

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    public Integer getCode() {
        return code;
    }

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

    public String getToken()
    {
        return token;
    }

    public void setToken(String token)
    {
        this.token = token;
    }

    public Long getUserid()
    {
        return userid;
    }

    public void setUserid(Long userid)
    {
        this.userid = userid;
    }

    public String getUsername()
    {
        return username;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public Long getLoginTime()
    {
        return loginTime;
    }

    public void setLoginTime(Long loginTime)
    {
        this.loginTime = loginTime;
    }

    public Long getExpireTime()
    {
        return expireTime;
    }

    public void setExpireTime(Long expireTime)
    {
        this.expireTime = expireTime;
    }

    public String getIpaddr()
    {
        return ipaddr;
    }

    public void setIpaddr(String ipaddr)
    {
        this.ipaddr = ipaddr;
    }

    public Set<String> getPermissions()
    {
        return permissions;
    }

    public void setPermissions(Set<String> permissions)
    {
        this.permissions = permissions;
    }

    public Set<String> getRoles()
    {
        return roles;
    }

    public void setRoles(Set<String> roles)
    {
        this.roles = roles;
    }

    public SysUser getSysUser()
    {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser)
    {
        this.sysUser = sysUser;
    }

    public JSONObject getUserEnv() {
        return userEnv;
    }

    public void setUserEnv(JSONObject userEnv) {
        this.userEnv = userEnv;
    }

    public List<Long> getSubDeptUserIds() {
        return subDeptUserIds;
    }

    public void setSubDeptUserIds(List<Long> subDeptUserIds) {
        this.subDeptUserIds = subDeptUserIds;
    }

    public List<Long> getDeptUserIds() {
        return deptUserIds;
    }

    public void setDeptUserIds(List<Long> deptUserIds) {
        this.deptUserIds = deptUserIds;
    }

    @Override
    public String toString() {
        return "LoginUser{" +
                "token='" + token + '\'' +
                ", userid=" + userid +
                ", username='" + username + '\'' +
                ", loginTime=" + loginTime +
                ", expireTime=" + expireTime +
                ", ipaddr='" + ipaddr + '\'' +
                ", permissions=" + permissions +
                ", roles=" + roles +
                ", sysUser=" + sysUser +
                ", userEnv=" + userEnv +
                ", subDeptUserIds=" + subDeptUserIds +
                ", deptUserIds=" + deptUserIds +
                ", code=" + code +
                ", loginType=" + loginType +
                '}';
    }
}
