package com.qimai.log.database

import androidx.room.*
import java.sql.Timestamp

/**
 * 数据库操作类
 */
@Dao
interface PushNotifiInfoDao {

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insert(word: PushNotifiInfo)

    @Query("update push_info set status= :status ,error_msg = :errorMsg where msg_id=:msg_id")
    suspend fun updateStatus(msg_id: String, status: Boolean, errorMsg: String? = null)


    //删除过期数据
    @Query("delete from push_info where time_stamp < :timestamp")
     fun deleteExpiredItems(timestamp: Long)
}