package com.ym.library.module

//import com.bytedance.sdk.openadsdk.TTFeedAd
//import com.bytedance.sdk.openadsdk.TTNativeAd
//import com.qq.e.ads.nativ.NativeUnifiedADData
import java.io.Serializable

/**
 * Created by Antonio on 2019/5/7.
 */


class NovelEntity : Serializable {

    var category: String? = ""
    var rowKey: String? = ""
    var channel: String? = ""
    var description: String? = ""
    var title: String? = ""
    var images: ArrayList<String>? = null
    var author: String? = ""
    var tags: ArrayList<String>? = null
    var coins: String? = ""
    var isCollected: Int? = 0
    var size: String? = ""
    var channels: ArrayList<String>? = null
    var url: String? = ""
    var chapterNum: Int? = 0
    var rate: String? = ""
    var historyRecord: String? = ""
    var hd: HD? = null
    var chapterIndex: String? = ""
    var showTag: String? = ""
//    var feedAd: TTFeedAd? = null
//    var gdtAd: NativeUnifiedADData? = null
    class HD : Serializable {
        var grade: String? = ""
        var onlineRead: String? = ""
        var popValue: String? = ""
    }


    //广告相关
    var reqId: String? = ""
    var ext: String? = ""
    var opentype: Int = 0
    var clickDownX: String? = ""
    var clickDownY: String? = ""
    var clickUpX: String? = ""
    var clickUpY: String? = ""
    var clickViewUpY: String? = ""
    var clickViewUpX: String? = ""
    var clickViewDownY: String? = ""
    var clickViewDownX: String? = ""
    var appmodel_id: Int = 0
    var slot_ad_type: Int = 0
    var ad_width: String? = ""
    var ad_height: String? = ""
    var clickId: String? = ""
    var clk_tracking: List<String>? = null
    var imp_tracking: MutableList<String>? = null
    var big_images: List<String>? = null
    var downloadSucc: List<String>? = null
    var startDownload: List<String>? = null
    var appActiveSucc: List<String>? = null
    var installSucc: List<String>? = null
    var startInstall: List<String>? = null
    var showFromFeed: List<String>? = null//曝光信息流
    var playFromFeed: List<String>? = null//点击信息流
    var showParams: MutableMap<String, String>? = null//曝光信息参数
    var playParams: MutableMap<String, String>? = null//点击信息参数
    var from: String? = ""
    var date: String? = ""//视频发布时间
    var duration: String? = ""//视频时长
    var tab_id: String = ""
    var slot_id: String? = ""
    var sid: Int = 0
    var type: Int = 0
//    var nativedAd: TTNativeAd? = null

    var image_render_type: Int? = 0
    var cornerText: String? = ""
    var isClick: Boolean = false
    var isShow: Boolean = false
    var miniProgram: NewsEntity.MiniPro? = null
    var videoSrc: NewsEntity.VideoSrc? = null
    var isPlaying = false
    var isDeeplinkSuc = false
    var icon_url: String? = ""
    var deepLink: String? = ""
    var adurl: String? = ""
    var deeplinkSucc: List<String>? = null//点击信息流

    companion object {
        const val TYPE_NEWS = 0//新闻
        const val TYPE_DSP_AD = 5//DSP广告
        const val TYPE_CMS_AD = 3//CMS广告
        const val TYPE_VIDEO = 2//视频

        const val TYPE_SOGOU_AD = 119//搜狗广告
        const val TYPE_FEED_AD = 118//今日头条广告
        const val TYPE_PUMA_AD = 126//瑞狮
        const val TYPE_GDT_AD = 141//广点通


        const val AD_TYPE_SDK = 1
        const val AD_TYPE_URL = 2
        const val AD_TYPE_API = 3
        const val AD_TYPE_SHARE = 4
        const val AD_TYPE_WAKEUP = 5
        const val AD_TYPE_DOWNLOAD = 6
        const val AD_TYPE_MINI_PROGRAM = 8
        const val AD_TYPE_VIDEO = 9

        const val AD_TYPE_APPMODEL = 7


        const val NONE_REDPACKET = 0
        const val REDPACKET = 1
    }

    override fun toString(): String {
        return "NovelEntity(rowKey=$rowKey, channel=$channel, description=$description, title=$title, images=$images, author=$author, tags=$tags, coins=$coins, isCollected=$isCollected, size=$size, channels=$channels, url=$url, opentype=$opentype, clickDownX=$clickDownX, clickDownY=$clickDownY, clickUpX=$clickUpX, clickUpY=$clickUpY, clickViewUpY=$clickViewUpY, clickViewUpX=$clickViewUpX, clickViewDownY=$clickViewDownY, clickViewDownX=$clickViewDownX, appmodel_id=$appmodel_id, slot_ad_type=$slot_ad_type, showTag=$showTag)"
    }


    var read_num: String? = ""
    var read_coins: String? = ""
    var adType: Int = 0
    var total_read_coins: String? = ""
    var delay: Int = 0
    var redPacketFlag: Int = 0
    var author_name: String = ""

    var timeTrigger: String? = ""
    var alertRenderType: String? = ""
    var current_nums: String? = ""
    var source: String? = ""
    var award_limit: String? = ""
    var sourceUrl: String? = ""

    var pubDate: String? = ""

    var tabid: String? = ""
    var image_url: String? = ""
    var deep_url_re: String? = ""
    var incentive_level: Int = 0
    var alert: String? = ""
    var explorerType: String? = ""
    var pk: String? = ""
    var position: Int = 0
    var isStick: Int = 0
    var pkg: String? = ""
    var total_coins: String? = ""
    var desc: String? = ""
    var redPackageText: String? = ""
    var contentType: String? = ""

    var progress: String? = ""
    var ts: String? = ""

    var adMarkImage: String? = ""
    var adMark: String? = ""
    var label: String? = ""
    var videoAdBody: String? = ""
    var shareType: String? = ""
    var shareUrl: String? = ""
    var status: Int = 0
    var autoPlay: Int = 0
    var quiet: Int = 0

//    var adView: NativeUnifiedADData? = null
    var isDowanload: Boolean = false
    var isDowanloadSuc: Boolean = false
    var isInstall: Boolean = false
    var trackFailIndex: MutableList<Int> = ArrayList()

    constructor() {
    }

    constructor(title: String?) {
        this.title = title
    }

    class Track : Serializable {
    }

    class VideoSrc : Serializable {
        var videoURL: String? = null
        var loadStart: List<String>? = null
        var loadFail: List<String>? = null
        var loadSuccess: List<String>? = null
        var playStart: List<String>? = null
        var playComplete: List<String>? = null
        var playCancel: List<String>? = null

        var followVideoImage: String? = null
        var followVideoURL: String? = null
        var followVideoH5: String? = null
    }


}
