package com.cm.common.wechat.pojo;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: WechatMiniAppUserInfoDetail
 * @Description:
 * @Author: WangGeng
 * @Date: 2020/10/29 18:36
 * @Version: 1.0
 **/
public class WechatMiniAppUserInfoDetail {

    private String openId;
    private String nickName;
    private Integer gender;
    private String city;
    private String province;
    private String country;
    private String avatarUrl;
    private String unionId;
    private String phoneNumber;
    private String purePhoneNumber;
    private String countryCode;
    private WaterMark watermark;

    public String getOpenId() {
        return openId == null ? "" : openId.trim();
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getNickName() {
        return nickName == null ? "" : nickName.trim();
    }

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

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getCity() {
        return city == null ? "" : city.trim();
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getProvince() {
        return province == null ? "" : province.trim();
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCountry() {
        return country == null ? "" : country.trim();
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getAvatarUrl() {
        return avatarUrl == null ? "" : avatarUrl.trim();
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getUnionId() {
        return unionId == null ? "" : unionId.trim();
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getPhoneNumber() {
        return phoneNumber == null ? "" : phoneNumber.trim();
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPurePhoneNumber() {
        return purePhoneNumber == null ? "" : purePhoneNumber.trim();
    }

    public void setPurePhoneNumber(String purePhoneNumber) {
        this.purePhoneNumber = purePhoneNumber;
    }

    public String getCountryCode() {
        return countryCode == null ? "" : countryCode.trim();
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public WaterMark getWatermark() {
        return watermark;
    }

    public void setWatermark(WaterMark watermark) {
        this.watermark = watermark;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"openId\":\"")
                .append(openId).append('\"');
        sb.append(",\"nickName\":\"")
                .append(nickName).append('\"');
        sb.append(",\"gender\":")
                .append(gender);
        sb.append(",\"city\":\"")
                .append(city).append('\"');
        sb.append(",\"province\":\"")
                .append(province).append('\"');
        sb.append(",\"country\":\"")
                .append(country).append('\"');
        sb.append(",\"avatarUrl\":\"")
                .append(avatarUrl).append('\"');
        sb.append(",\"unionId\":\"")
                .append(unionId).append('\"');
        sb.append(",\"phoneNumber\":\"")
                .append(phoneNumber).append('\"');
        sb.append(",\"purePhoneNumber\":\"")
                .append(purePhoneNumber).append('\"');
        sb.append(",\"countryCode\":\"")
                .append(countryCode).append('\"');
        sb.append(",\"watermark\":")
                .append(watermark);
        sb.append('}');
        return sb.toString();
    }

    public static class WaterMark {
        private String appid;
        private Long timestamp;

        public String getAppid() {
            return appid == null ? "" : appid.trim();
        }

        public void setAppid(String appid) {
            this.appid = appid;
        }

        public Long getTimestamp() {
            return timestamp;
        }

        public void setTimestamp(Long timestamp) {
            this.timestamp = timestamp;
        }

        @Override
        public String toString() {
            final StringBuilder sb = new StringBuilder("{");
            sb.append("\"appid\":\"")
                    .append(appid).append('\"');
            sb.append(",\"timestamp\":")
                    .append(timestamp);
            sb.append('}');
            return sb.toString();
        }
    }

}
