package com.module.database.room.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.DeleteTable
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.module.database.room.entity.BillBean
import com.module.database.room.entity.WarringBean

@Dao
interface WarringDao {

    @Query("SELECT * FROM warring")
    suspend fun getAll():MutableList<WarringBean>

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insert(warringBean: WarringBean)

    @Update
    suspend fun update(warringBean: WarringBean): Int

    @Delete
    suspend fun delete(warringBean: WarringBean): Int
    @Query("DELETE FROM warring")
    suspend fun deleteAll():Int
}