package com.base.browserwhite.bean

import com.base.browserwhite.utils.LogEx
import com.google.android.gms.ads.nativead.NativeAd
import java.util.concurrent.TimeUnit

class NewsBean(
    val newsId: Long = 0,
    val publishTime: Long = 0,
    val headline: String = "",//标题
    val orgImgPath: String = "",//原媒体图片
    val mediaName: String = "",
    val mediaIcon: String = "",//媒体icon
    val categoryId: Int = 0,
    val type: Int = 0,
    val linkPath: String = "",//网站链接
) {
    var uiType: Int = 0//0新闻 1广告
    var nativeAd: NativeAd? = null
    var nativeAdLoadTime: Long = 0

    fun isNativeAdTimeout(): Boolean {
        val outTime = System.currentTimeMillis() - nativeAdLoadTime
        LogEx.logDebug("NewsBean", "outTime=$outTime")
        return outTime > 30 * 60 * 1000L
    }
}

// 栏目类别  0：最新 ， 101 ：政治， 301：体育 ，娱乐：501 ，
//世界：2401，生活方式：2001，公共安全：1802，经济：401
class NewsCategory(
    val id: Int = 0,
    val name: String = ""
)