package com.flossom.miniProgram.domain.vo;

import com.flossom.common.core.utils.StringUtils;

import java.util.List;

/**
 * 分页获取 微信公众号 的关注者用户详情
 */
public class OfficialAccountUserDetailRet {

    private List<userInfoList> user_info_list;

    private Integer errcode;

    private String errmsg;

    public OfficialAccountUserDetailRet() {
    }

    public OfficialAccountUserDetailRet(List<userInfoList> user_info_list, Integer errcode, String errmsg) {
        this.user_info_list = user_info_list;
        this.errcode = errcode;
        this.errmsg = errmsg;
    }

    public List<userInfoList> getUser_info_list() {
        return user_info_list;
    }

    public void setUser_info_list(List<userInfoList> user_info_list) {
        this.user_info_list = user_info_list;
    }

    public Integer getErrcode() {
        return errcode;
    }

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

    public String getErrmsg() {
        return errmsg;
    }

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

    public Boolean isContainUnionid(String unionid) {
        for (userInfoList userInfoList : this.getUser_info_list()) {
            if (StringUtils.equals(userInfoList.getUnionid(), unionid)) {
                return true;
            }
        }
        return false;
    }

    class userInfoList {
        private Integer subscribe;
        private String openid;
        private String language;
        private String subscribe_time;
        private String unionid;
        private String remark;
        private Integer groupid;
        private List<Integer> tagid_list;
        private String subscribe_scene;
        private String qr_scene;
        private String qr_scene_str;

        public userInfoList() {
        }

        public userInfoList(Integer subscribe, String openid, String language, String subscribe_time, String unionid, String remark, Integer groupid, List<Integer> tagid_list, String subscribe_scene, String qr_scene, String qr_scene_str) {
            this.subscribe = subscribe;
            this.openid = openid;
            this.language = language;
            this.subscribe_time = subscribe_time;
            this.unionid = unionid;
            this.remark = remark;
            this.groupid = groupid;
            this.tagid_list = tagid_list;
            this.subscribe_scene = subscribe_scene;
            this.qr_scene = qr_scene;
            this.qr_scene_str = qr_scene_str;
        }

        public Integer getSubscribe() {
            return subscribe;
        }

        public void setSubscribe(Integer subscribe) {
            this.subscribe = subscribe;
        }

        public String getOpenid() {
            return openid;
        }

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

        public String getLanguage() {
            return language;
        }

        public void setLanguage(String language) {
            this.language = language;
        }

        public String getSubscribe_time() {
            return subscribe_time;
        }

        public void setSubscribe_time(String subscribe_time) {
            this.subscribe_time = subscribe_time;
        }

        public String getUnionid() {
            return unionid;
        }

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

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public Integer getGroupid() {
            return groupid;
        }

        public void setGroupid(Integer groupid) {
            this.groupid = groupid;
        }

        public List<Integer> getTagid_list() {
            return tagid_list;
        }

        public void setTagid_list(List<Integer> tagid_list) {
            this.tagid_list = tagid_list;
        }

        public String getSubscribe_scene() {
            return subscribe_scene;
        }

        public void setSubscribe_scene(String subscribe_scene) {
            this.subscribe_scene = subscribe_scene;
        }

        public String getQr_scene() {
            return qr_scene;
        }

        public void setQr_scene(String qr_scene) {
            this.qr_scene = qr_scene;
        }

        public String getQr_scene_str() {
            return qr_scene_str;
        }

        public void setQr_scene_str(String qr_scene_str) {
            this.qr_scene_str = qr_scene_str;
        }
    }
}
