40 lines
1.7 KiB
Kotlin
40 lines
1.7 KiB
Kotlin
package com.gh.gamecenter.entity
|
|
|
|
import android.os.Parcelable
|
|
import com.gh.common.annotation.SyncPage
|
|
import com.gh.common.syncpage.SyncFieldConstants
|
|
import com.google.gson.annotations.SerializedName
|
|
import kotlinx.android.parcel.Parcelize
|
|
|
|
@Parcelize
|
|
data class CommentEntity(@SerializedName("_id")
|
|
var id: String? = null,
|
|
var user: UserEntity = UserEntity(),
|
|
var parent: ArticleCommentParent? = null,
|
|
@SerializedName("parent_user")
|
|
var parentUser: CommentParentEntity? = null,
|
|
var content: String? = null,
|
|
@SyncPage(syncNames = [SyncFieldConstants.ARTICLE_COMMENT_VOTE_COUNT])
|
|
var vote: Int = 0,
|
|
@SyncPage(syncNames = [SyncFieldConstants.ARTICLE_COMMENT_REPLY_COUNT])
|
|
var reply: Int = 0,
|
|
var time: Long = 0,
|
|
var priority: Int = 0,
|
|
@SerializedName("me")
|
|
var me: MeEntity? = null,
|
|
@SerializedName("is_top")
|
|
var isTop: Boolean = false,//是否置顶
|
|
// 楼数,本地字段
|
|
var floor: Int = 0,
|
|
@SerializedName("attached") // 楼中楼
|
|
var subCommentList: ArrayList<CommentEntity>? = null) : Parcelable {
|
|
|
|
fun clone(): CommentEntity {
|
|
return CommentEntity(id, user, parent, parentUser, content, vote, reply, time, priority, me, isTop, floor, subCommentList)
|
|
}
|
|
|
|
companion object {
|
|
const val TAG = "CommentEntity"
|
|
}
|
|
}
|