package com.willalp.common.core.domain.vo;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 用户对象 sys_user
 *
 * @author willalp
 */
@Data
public class SysUserVo {
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 用户账号
     */
    private String userName;

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


    /**
     * 用户类型
     */
    private String userType;

    /**
     * 用户邮箱
     */
    private String email;

    /**
     * 手机号码
     */
    private String phoneNumber;

    /**
     * 用户性别
     */
    private String sex;

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

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

    private Integer cardType;

    private String cardNumber;

    private String organizationCode;

    private String relatedAccount;

    private BigDecimal integral;

    private Map<String, String> organizations = new HashMap<>(16);


    public SysUserVo() {

    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("nickName", getNickName())
                .append("userType", getUserType())
                .append("email", getEmail())
                .append("phonenumber", getPhoneNumber())
                .append("sex", getSex())
                .append("avatar", getAvatar())
                .append("loginDate", getLoginDate())
                .append("cardType", getCardType())
                .append("cardNumber", getCardNumber())
                .append("organizationCode", getOrganizationCode())
                .append("relatedAccount", getRelatedAccount())
                .append("integral", getIntegral())
                .toString();
    }

}
