package com.ruoyi.system.domain;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 第三方授权对象 sys_auth_user
 * 
 * @author ruoyi
 * @date 2023-06-17
 */
@TableName("sys_auth_user")
public class SysAuthUser
{
    private static final long serialVersionUID = 1L;

    /** 授权ID */
    @TableId
    private Long authId;
    /** 第三方平台用户唯一ID */
    @Excel(name = "第三方平台用户唯一ID")
    private String uuid;
    /** 系统用户ID */
    @Excel(name = "系统用户ID")
    private Long userId;
    /** 登录账号 */
    @Excel(name = "第三方账号")
    private String userName;
    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickName;
    /** 头像地址 */
    @Excel(name = "头像地址")
    private String avatar;
    /** 用户邮箱 */
    @Excel(name = "用户邮箱")
    private String email;
    /** 用户来源 */
    @Excel(name = "用户来源")
    private String source;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    public void setAuthId(Long authId)
    {
        this.authId = authId;
    }

    public Long getAuthId()
    {
        return authId;
    }
    public void setUuid(String uuid)
    {
        this.uuid = uuid;
    }

    public String getUuid()
    {
        return uuid;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public String getNickName()
    {
        return nickName;
    }
    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAvatar()
    {
        return avatar;
    }
    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getEmail()
    {
        return email;
    }
    public void setSource(String source)
    {
        this.source = source;
    }

    public String getSource()
    {
        return source;
    }

    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("authId", getAuthId())
                .append("uuid", getUuid())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("nickName", getNickName())
                .append("avatar", getAvatar())
                .append("email", getEmail())
                .append("source", getSource())
                .append("createTime", getCreateTime())
                .toString();
    }

    public static void main(String[] args) {
        System.out.println(StrUtil.hide("root", 0, "root".length() ));

    }
}
