package com.gh.gamecenter.entity

import android.os.Parcelable
import com.gh.gamecenter.feature.entity.GameSubjectData
import kotlinx.parcelize.Parcelize

@Parcelize
class SubjectData(
    // 入口必填
    var subjectId: String?,
    var subjectName: String?,
    var isOrder: Boolean?,
    // 专题内参数
    var sort: String = "", // Filter:评分/最新/最热/更新
    var filter: String = "", // Filter: 类型(分类)
    var tagType: String? = "", // 游戏Item 标签类型
    var briefStyle: String = "",
    var showSuffix: Boolean = true,

    var requireUpdateSetting: Boolean = false, // 多专题页面需要专题页面自行获取专题配置
    var isAdData: Boolean = false,
) : Parcelable, Cloneable {

    fun deepCopy(): SubjectData {
        return super.clone() as SubjectData
    }

    fun toGameSubjectData(): GameSubjectData {
        return GameSubjectData(
            id = subjectId,
            name = subjectName,
            isOrder = isOrder ?: false,
            briefStyle = briefStyle,
            isShowSuffix = showSuffix,
            tag = tagType
        )
    }
}
