package com.ym.library.module

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


/**
 * Created by gaoleichao on 2018/7/13.
 */
class NewsEntity : Serializable {
    var reqId: String? = ""
    var slotName: String? = "" // video
    var slotId: String? = "" //
    var awardLimit:Int?=0
    var codeId: String? = ""//拉取SDK广告用codeId
    var codeAppId: String? = ""//
    var sdkRenderType = 0// 广告渲染类型 1. 自渲染 2.模板渲染
    var adPlatform: String? = "" // chuanshanjia...
    var platformId = 0//平台 id
    var adType: Int = 0// 广告类型  4.大图广告   5.开屏   7.激励视频   8.全屏视频
    var clk_tracking: List<String> = arrayListOf()
    var imp_tracking: List<String> = arrayListOf()
    var showfail_tracking: List<String> = ArrayList()
    var pullsucc_tracking: List<String> = ArrayList()
    var pullfail_tracking: List<String> = ArrayList()
    var backups:List<NewsEntity> = arrayListOf()

    class backupsEntity {
        var reqId: String? = ""
        var slotName: String? = "" // video
        var slotId: String? = "" //
        var codeId: String? = ""//拉取SDK广告用codeId
        var codeAppId: String? = ""//
        var sdkRenderType = 0// 广告渲染类型 1. 自渲染 2.模板渲染
        var adPlatform: String? = "" // chuanshanjia...
        var platformId = 0//平台 id
        var adType: Int = 0// 广告类型  4.大图广告   5.开屏   7.激励视频   8.全屏视频
        var clk_tracking: List<String>? = null
        var imp_tracking: List<String>? = null
    }

    var duration: String? = ""//视频时长
    var appComments: String? = ""//视频时长
    var awardCoins: Int? = 0//视频时长
    var appScore: Int? = 0
    var isDowanloaded: Boolean = false
    var closeViewType: Int? = 0
    var feedAd: TTFeedAd? = null
    var adView: NativeUnifiedADData? = null
    var tab_id: String = ""
    var type: Int = 0
    var slot_id: String? = ""
    var read_num: String? = ""
    var read_coins: String? = ""
    var total_read_coins: String? = ""
    var buttonText:String? = ""
    var delay: Int = 0
    var redPacketFlag: Int = 0
    var author_name: String = ""
    var appmodel_id: Int = 0
    var slot_ad_type: Int = 0
    var category: String? = ""
    var timeTrigger: String? = ""
    var templateId: Int? = 7// 广告类型

    var current_nums: Int? = 0
    var source: String? = ""
    var award_limit: String? = ""
    var sourceUrl: String? = ""
    var url: String? = ""
    var title: String? = ""
    var description: String? = null
    var pubDate: String? = ""
    var images: List<String>? = null
    var icon_url: String? = null
    var sid: Int = 0
    var tabid: String? = ""
    var image_url: String? = ""
    var deep_url_re: String? = ""
    var incentive_level: Int = 0
    var opentype: Int = 0
    var alert: String? = ""
    var alertRenderType: String = ""
    var awardDesc: Int = 0
    var explorerType: String? = ""
    var pk: String? = ""
    var image_render_type: Int = 0
    var position: Int = 0
    var isStick: Int = 0
    var coins: Int = 0
    var pkg: String? = ""
    var total_coins: String? = ""
    var desc: String? = ""
    var redPackageText: String? = ""
    var contentType: String? = ""
    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 clickDownX: String? = ""
    var clickDownY: String? = ""
    var clickUpX: String? = ""
    var clickId: String? = ""
    var clickUpY: String? = ""
    var progress: String? = ""
    var ts: String? = ""
    var ad_width: String? = ""
    var ad_height: String? = ""
    var adMarkImage: String? = ""
    var adMark: String? = ""
    var label: String? = ""
    var videoAdBody: String? = ""
    var rowKey: String? = ""
    var shareType: String? = ""
    var shareUrl: String? = ""
    var status: Int = 0
    var autoPlay: Int = 0
    var quiet: Int = 0
    var awardRangeStart: Int? = null // 奖励范围
    var awardRangeEnd: Int? = null
    var buttonSway: Int? = 0//按钮是否晃动 1晃动 2不晃动
    var adRenderStyle: Int? = 0 //1普通  2幸运


    var clickViewUpY: String? = ""
    var clickViewUpX: String? = ""
    var clickViewDownY: String? = ""
    var clickViewDownX: String? = ""
    var cornerText: String? = ""
    var isClick: Boolean = false
    var isShow: Boolean = false
    var miniProgram: MiniPro? = null
    var videoSrc: VideoSrc? = null
    var isPlaying = false

    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 buttonImg: String? = ""
    var countdownSecond: Int? = 0
    class Track : Serializable {
        var replace: String? = ""
        var default: String? = ""
    }

    class MiniPro : Serializable {
        var miniPath: String? = ""
        var miniId: String? = ""
        var appId: String? = ""
    }


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

        var followVideoImage: String? = null
        var followVideoURL: String? = null
        var followVideoH5: 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






        const val TYPE_IFYD_IMG_AD = 2239//科大訊飛大圖
        const val TYPE_IFYD_VIDEO_AD = 2240//科大訊飛大圖
        const val TYPE_SHAHU_VIDEO_AD = 2166//珊瑚（天卓）
        const val TYPE_BAIHUI_FULL_VIDEO_AD = 2264//百汇全屏视频
        const val TYPE_BAIHUI_REWARD_VIDEO_AD = 2263//百汇激励视频）
        const val TYPE_KUAISHOU_AD = 2039//广点通
        const val TYPE_GDT_VIDEO_AD = 2046//广点通
        const val TYPE_FEED_VIDEO_AD = 1934//今日头条广告
        const val TYPE_FULL_VIDEO_AD = 2086//全屏
        const val TYPE_DRAW_VIDEO_AD = 1//全屏
        const val TYPE_KS_AD = 2232//全屏
        const val TYPE_MEITU_SPLASH_AD = 2296//美图开屏

    }

    var isDeeplinkSuc = false
    var deeplinkSucc: MutableList<String>? = null
    var isDowanload: Boolean = false
    var isDowanloadSuc: Boolean = false
    var isInstall: Boolean = false

}
