package com.xhpc.system.api.model;

import com.xhpc.system.api.domain.SysUser;

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

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

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

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

    /**
     * 用户账号（手机号、账号）
     */
    private String username;

    /**
     * 用户类型（0 C端用户 1 流量方用户 2社区用户 3B端用户）
     */
    private Integer userType;

    /**
     * 是否超管 0 是系统超管  1 某个租户超管  2普通用户
     */
    private Integer superType;


    private String userTypeUtil;

    /**
     * 租户id
     */
    private String tenantId;

    /**
     * 登录用户的openID
     */
    private String openId;

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

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

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

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

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

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

    /**
     * 是否已过期 0-未启用，1-正常，2-停用
     */
    private Integer status;

    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 Integer getUserType() {

        return userType;
    }

    public void setUserType(Integer userType) {

        this.userType = userType;
    }

    public String getTenantId() {

        return tenantId;
    }

    public void setTenantId(String tenantId) {

        this.tenantId = tenantId;
    }

    public String getOpenId() {

        return openId;
    }

    public void setOpenId(String openId) {

        this.openId = openId;
    }

    public String getUserTypeUtil() {
        return userTypeUtil;
    }

    public void setUserTypeUtil(String userTypeUtil) {
        this.userTypeUtil = userTypeUtil;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSuperType() {
        return superType;
    }

    public void setSuperType(Integer superType) {
        this.superType = superType;
    }

    @Override
    public String toString() {
        return "LoginUser{" +
                "token='" + token + '\'' +
                ", userid=" + userid +
                ", username='" + username + '\'' +
                ", userType=" + userType +
                ", superType=" + superType +
                ", userTypeUtil='" + userTypeUtil + '\'' +
                ", tenantId='" + tenantId + '\'' +
                ", openId='" + openId + '\'' +
                ", loginTime=" + loginTime +
                ", expireTime=" + expireTime +
                ", ipaddr='" + ipaddr + '\'' +
                ", permissions=" + permissions +
                ", roles=" + roles +
                ", sysUser=" + sysUser +
                ", status=" + status +
                '}';
    }
}
