package com.gh.gamecenter.feature.entity

import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.IgnoredOnParcel

data class MessageDigestEntity(
    @SerializedName("_id")
    var id: String = "",
    @SerializedName("session_message_type")
    var sessionMessageType: String = "",
    @SerializedName("message_type")
    var messageType: String = "",
    @SerializedName("game_id")
    var gameId: String = "",
    @SerializedName("game_name")
    var gameName: String = "",
    @SerializedName("game_type")
    var category: String = ""
) {
    @IgnoredOnParcel
    val messageTypeChinese: String
        get() = when (messageType) {
            "求加速回复" -> "求加速版本"
            "求版本回复" -> "投票"
            "comment_vote",
            "answer_vote",
            "answer_comment_vote",
            "community_article_comment_vote",
            "community_article_comment_reply_vote",
            "community_article_vote",
            "game_comment_vote",
            "game_comment_reply_vote",
            "video_vote",
            "video_comment_vote",
            "video_comment_reply_vote",
            "game_list_comment_vote",
            "game_list_vote",
            "activity_comment_vote",
            "activity_comment_reply_vote" -> "赞同"
            "reply",
            "answer",
            "update-answer",
            "follow_question",
            "reply_answer_comment",
            "answer_comment",
            "community_article_comment",
            "reply_community_article_comment",
            "game_comment_reply",
            "video_comment",
            "video_comment_reply",
            "game_list_comment",
            "game_list_comment_reply",
            "reply_activity_comment" -> "普通消息"
            "system_invited",
            "invited" -> "邀请"
            "game_server_opening" -> "游戏开服日历"
            else -> messageType
        }

    @IgnoredOnParcel
    val categoryChinese: String
        get() = when (category) {
            "online" -> "网络"
            "local" -> "单机"
            "welfare" -> "福利"
            "simulator" -> "模拟器"
            else -> category ?: ""
        }

    @IgnoredOnParcel
    val sessionMessageTypeChinese: String
        get() = when (sessionMessageType) {
            "system" -> "系统消息"
            "user" -> "互动消息"
            "announcement" -> "运营消息"
            "service" -> "客服消息"
            "game" -> "游戏消息"
            "bbs" -> "论坛消息"
            else -> sessionMessageType
        }
}