package ink.wgink.module.wechat.miniapp.pojo.bos;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: WechatMiniAppUserInfo
 * @Description: 微信小程序用户信息
 * @Author: WangGeng
 * @Date: 2020/5/9 18:29
 * @Version: 1.0
 **/
public class MiniappUserInfoBO {

    private String openid;
    private String session_key;
    private String unionid;
    private Integer errcode;
    private String errmsg;
    private long updateTime;

    public String getOpenid() {
        return openid == null ? "" : openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getSession_key() {
        return session_key == null ? "" : session_key;
    }

    public void setSession_key(String session_key) {
        this.session_key = session_key;
    }

    public String getUnionid() {
        return unionid == null ? "" : unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg == null ? "" : errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"openid\":\"")
                .append(openid).append('\"');
        sb.append(",\"session_key\":\"")
                .append(session_key).append('\"');
        sb.append(",\"unionid\":\"")
                .append(unionid).append('\"');
        sb.append(",\"errcode\":")
                .append(errcode);
        sb.append(",\"errmsg\":\"")
                .append(errmsg).append('\"');
        sb.append(",\"updateTime\":")
                .append(updateTime);
        sb.append('}');
        return sb.toString();
    }
}
