package com.gh.gamecenter.entity

import com.gh.gamecenter.common.entity.CommunityEntity
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.google.gson.annotations.SerializedName

data class HomeSlide(
    @SerializedName("link_type")
    val linkType: String = "",
    @SerializedName("link_id")
    val linkId: String = "",
    @SerializedName("link_text")
    val linkText: String = "",
    @SerializedName("link_game")
    val linkGame: GameEntity? = null,
    @SerializedName("recommend_type")
    val recommendType: String = "",
    val image: String = "",
    val title: String = "",
    val text: String = "",
    @SerializedName("placeholder_color")
    val placeholderColor: String = "#5C9599",
    @SerializedName("link_community")
    val community: CommunityEntity? = null
) {

    fun transformLinkEntity(): LinkEntity {
        return LinkEntity(
            name = title,
            type = linkType,
            link = linkId,
            text = linkText,
            community = community
        )
    }
}