package com.yidianling.dynamic.model;

import com.google.gson.annotations.SerializedName;
import com.ydl.ydlcommon.bean.ShareData;

import java.util.List;

/**
 * Created by Jim on 2017/9/22 0022.
 */

public class TrendsListBean {
    public int status;
    public int code;
    public String msg;
    public int array_flag;
    public List<Trend> data;
    //banner广告图
    public List<Banner> bannerResps;
    @SerializedName(value = "ext_data",alternate = "extData")
    public List<ExtData> ext_data;

    public static class Banner{
        public String bannerId;
        public String bannerImageUrl;
        public String bannerLinkUrl;
        public String bannerTitle;
    }

    public static class Trend {
        /**
         * 问答发布者头像，匿名为null
         */
        public String avatar;
        /**
         * 问答发布者uid，匿名为0
         */
        public String uid;
        /**
         * 问答发布显示名称，匿名null
         */
        public String name;
        /**
         * 问题的标题
         */
        public String title;
        /**
         * askId
         */
        public String id;
        /**
         * 问答发布内容
         */
        public String content;
        public int is_hot;
        public int is_top;
        /**
         * 问答创建时间
         */
        @SerializedName(value = "time_str",alternate = "timeStr")
        public String timeStr;
        /**
         * 问答发布者性别
         */
        public String gender;
        /**
         * 来自平台
         */
        public String from;
        /**
         * 总的温暖数量
         */
        @SerializedName(value = "zan_count",alternate = "zanCount")
        public int zanCount;
        /**
         * 评论数
         */
        @SerializedName(value = "comments_count",alternate = "commentsCount")
        public int commentsCount;
        /**
         * 访问量
         */
        @SerializedName(value = "visit_count",alternate = "visitCount")
        public String visitCount;
        /**
         * 内容类型：1纯文本，2图片，3图文，4url链接和app内部跳转
         */
        @SerializedName(value = "multitext_type",alternate = "multitextType")
        public int multitextType;
        /**
         *
         */
        public String utype;
        /**
         * 话题id，1:心事问答
         */
        @SerializedName(value = "topic_id",alternate = "topicId")
        public String topicId;
        /**
         * 话题的标题
         */
        @SerializedName(value = "topic_title",alternate = "topicTitle")
        public String topicTitle;
        /**
         * 点赞，1点赞，2未点赞
         */
        @SerializedName(value = "is_zan",alternate = "isZan")
        public int isZan;
        public Ext ext;
        @SerializedName(value = "small_attach",alternate = "smallAttach")
        public List<String> smallAttach;
        /**
         * 附件
         */
        @SerializedName(value = "big_attach",alternate = "bigAttach")
        public List<String> bigAttach;
        /**
         *  问答答案列表
         */
        public List<Comments> comments;
        @SerializedName(value = "is_ad",alternate = "isAd")
        public int isAd;
        /**
         * 广告跳转h5
         */
        public String url;
        /**
         * 广告跳转h5分享数据
         */
        public ShareData share;
        public int isAssistantGuide =0;
        public String assistantGuideImg;
        /**
         * 广告图片
         */
        @SerializedName(value = "ad_img",alternate = "adImg")
        public String adImg;
        @SerializedName(value = "foc_id",alternate = "focId")
        public int focId;

        public static class Ext {
            public String cover;
            public String url;
            public String title;
        }

        public static class Comments {
            public String name;
            public String content;
            public String to_name;
        }

//        @Override
//        public String toString() {
//            return "Trend{" +
//                    "avatar='" + avatar + '\'' +
//                    ", uid=" + uid +
//                    ", name='" + name + '\'' +
//                    ", title='" + title + '\'' +
//                    ", id='" + id + '\'' +
//                    ", content='" + content + '\'' +
//                    ", is_hot=" + is_hot +
//                    ", is_top=" + is_top +
//                    ", time_str='" + timeStr + '\'' +
//                    ", gender='" + gender + '\'' +
//                    ", from='" + from + '\'' +
//                    ", zan_count='" + zanCount + '\'' +
//                    ", comments_count='" + commentsCount + '\'' +
//                    ", visit_count='" + visitCount + '\'' +
//                    ", multitext_type='" + multitextType + '\'' +
//                    ", utype='" + utype + '\'' +
//                    ", topic_id='" + topicId + '\'' +
//                    ", topic_title='" + topicTitle + '\'' +
//                    ", is_zan=" + isZan +
//                    ", ext=" + ext.toString() +
//                    ", small_attach=" + smallAttach +
//                    ", big_attach=" + bigAttach +
//                    ", comments=" + comments +
//                    '}';
//        }
    }

    public static class ExtData implements ITopTrends{
        public String id = "";
        public String title = "";
        @SerializedName(value = "is_top",alternate = "isTop")
        public String is_top = "";
        @SerializedName(value = "create_time",alternate = "createTime")
        public String create_time = "";

        @Override
        public String getId() {
            return id;
        }

        @Override
        public String getTitle() {
            return title;
        }

        @Override
        public String getIs_top() {
            return is_top;
        }

        @Override
        public String getCreate_time() {
            return create_time;
        }

//        @Override
//        public String toString() {
//            return "ExtData{" +
//                    "id='" + id + '\'' +
//                    ", title='" + title + '\'' +
//                    ", is_top='" + is_top + '\'' +
//                    ", create_time='" + create_time + '\'' +
//                    '}';
//        }
    }

//    @Override
//    public String toString() {
//        return "TrendsListBean{" +
//                "status=" + status +
//                ", code=" + code +
//                ", msg='" + msg + '\'' +
//                ", array_flag=" + array_flag +
//                ", data=" + data +
//                ", ext_data=" + ext_data +
//                '}';
//    }
}
