package com.various.funny.sounds.audio.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.various.funny.sounds.audio.data.NewBeanChild


@Dao
interface NewBeanChildDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend  fun insertData(child: NewBeanChild)

    @Query("select * from sounds where classId = :id ")
    suspend fun getData(id: String): List<NewBeanChild>

    @Query("select * from sounds where isCollect = :collect ")
    suspend fun getCollectData(collect:Boolean = true): List<NewBeanChild>

    @Update
    suspend fun updateData(newBeanChild: NewBeanChild)
}






