package com.renrenliao.im.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.renrenliao.im.bean.UserInfo
import com.renrenliao.im.im.ImMsgBean
import kotlinx.coroutines.flow.Flow

/**
 **@ClassName ImMsgDao
 **@Description
 **@Author gan
 **@Date 2022/6/17 12:28
 **/

@Dao
interface ImMsgDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertMsg(imMsgBean: ImMsgBean)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertMsgs(imMsgs: List<ImMsgBean>)

    //更新消息发送状态
    @Query("UPDATE message SET sendStatus = :sendStatus where fp = :fp AND account_uid = :account_uid")
    fun  updateSendStatus(sendStatus:Int,fp: String,account_uid: String)


}