package com.gh.gamecenter.qa.entity

import android.os.Parcelable
import com.gh.gamecenter.common.entity.CommunityEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.MeEntity
import com.gh.gamecenter.entity.UserEntity
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize

@Parcelize
data class ArticleDetailEntity(
    @SerializedName("_id")
    val id: String = "",
    @SerializedName("_seq")
    val shortId: String = "",
    var title: String = "",
    var content: String = "",
    var tags: List<String> = ArrayList(),
    val count: Count = Count(),
    var user: UserEntity = UserEntity(),
    var me: MeEntity = MeEntity(),
    val time: TimeEntity = TimeEntity(),
    var community: CommunityEntity = CommunityEntity(),
    var commentable: Boolean? = true,
    @SerializedName("is_jx")
    var isHighlighted: Boolean = true,
    @SerializedName("community_id")
    var communityId: String = "",
    var images: List<String> = ArrayList(),
    @SerializedName("images_info")
    var imagesInfo: List<ImageInfo> = ArrayList(),
    var videos: List<CommunityVideoEntity> = ArrayList(),
    @SerializedName("tag_activity_id")
    var tagActivityId: String = "",
    @SerializedName("tag_activity_name")
    var tagActivityName: String = "",
    var type: String? = "",
    @SerializedName("game")
    var gameEntity: GameEntity? = null,
    @SerializedName("choiceness_status")
    var choicenessStatus: String? = "",// 精选状态 apply（申请）, pass  already（已精选） cancel  not_yet（未精选）
    var status: String? = "pass",//pass通过，fail未通过，pending审核中
    var original: String? = "",
    val source: SourceEntity? = null
) : Parcelable {

    fun getSimplifyChoicenessStatus(): String {
        return when (choicenessStatus) {
            "already" -> "pass"
            "not_yet" -> "cancel"
            else -> choicenessStatus ?: ""
        }
    }
}


