package com.remax.visualnovel.entity.imbean

import com.remax.visualnovel.manager.nim.FetchResult
import com.remax.visualnovel.manager.nim.LoadStatus
import com.netease.nimlib.sdk.v2.message.V2NIMMessage


/**
 * Created by HJW on 2020/9/28
 */
open class IMMessageWrapper(
    open var message: V2NIMMessage? = null,
    var type: Int = OUT_TEXT_TYPE,
) {
    /**
     * 表示该消息后是否要加一条AI输入中的消息
     */
    var aiIsSending: Boolean = true

    var fetchType: FetchResult.FetchType = FetchResult.FetchType.Init
    var loadStatus: LoadStatus = LoadStatus.Success

    companion object {
        const val BASE_INFO = 0

        // ai回复中
        const val INPUT_ING = 1

        const val OUT_TEXT_TYPE = 2
        const val IN_TEXT_TYPE = 3

        const val OUT_IMAGE_TYPE = 4
        const val IN_IMAGE_TYPE = 5

        const val OUT_GIFT_TYPE = 6

        const val OUT_CALL_TYPE = 7

        /**
         * 心动等级升级/降级
         */
        const val HEART_BEAT_CHANGED_TYPE = 8
    }
}