package com.swago.baseswago.model

import com.swago.baseswago.R
import com.swago.baseswago.im.IRoomChat
import com.swago.baseswago.im.RoomMsgType.SYSTEM_MESSAGE
import com.swago.baseswago.util.AppContext

/**
 *@date 2022/4/11 22:04
 *description:
 */
class RedEnvelope :IRoomChat{
    val id: String = ""
    var coldTime: Int=0//抢红包倒计时
    var receiveTime: Int=0//红包结束倒计时
    val anchorId: String = ""
    val anchorAvatar:String = ""
    val anchorName: String = ""
    val group_id: String = ""
    val roomId: String = ""
    val senderAvatar: String = ""
    val senderLevel: Int=0
    @JvmField
    val senderName: String = ""//发红包用户昵称
    val userId: String = ""//发红包的用户id

    override fun getSenderName(): String {
        return senderName
    }

    override fun getMsgContent(): String {
        return "${senderName}: ${AppContext.getContext().resources.getString(R.string.prepare_to_open_red_envelope)}"
    }

    override fun getMsgType(): Int {
        return SYSTEM_MESSAGE
    }

    override fun getUserLevel(): Int {
        return senderLevel
    }

    override fun getIsBenefit(): Int {
        return 0
    }

    override fun getSenderId(): String {
        return userId
    }

    override fun getIsPrettyId(): Boolean {
        return false
    }
}
