package com.zhiqiyun.open.core.models.user;

import com.zhiqiyun.open.core.enmus.Gender;
import lombok.Data;

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

/**
 * @author jtoms
 */
@Data
public class OauthInfo implements Serializable {

    private static final long serialVersionUID = -7252878048497511413L;

    /**
     * 唯一标识
     */
    private Long id;

    /**
     * 用户昵称
     */
    private String nickName;

    /**
     * 用户性别
     */
    private Gender gender;

    /**
     * 最后登录时间
     */
    private Date loginTime;

    /**
     * 用户登录令牌
     */
    private String accessToken;

    /**
     * 用户头像
     */
    private String avatar;

    /**
     * 用户权限
     */
    private List<String> authorities;

    public OauthInfo setId(Long id) {
        this.id = id;
        return this;
    }

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

    public OauthInfo setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
        return this;
    }

    public OauthInfo setAccessToken(String accessToken) {
        this.accessToken = accessToken;
        return this;
    }

    public OauthInfo setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }

    public OauthInfo setAuthorities(List<String> authorities) {
        this.authorities = authorities;
        return this;
    }

    public OauthInfo setGender(Gender gender) {
        this.gender = gender;
        return this;
    }
}
