package com.offline.music.task.player.db.bean

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update

@Dao
interface CurrentPlayingLocalAudioDao {
    @Query("SELECT * FROM current_playing_audio LIMIT 1")
    suspend fun getCurrentPlayingAudio(): CurrentPlayingLocalAudio?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertCurrentPlayingAudio(audio: CurrentPlayingLocalAudio)

    @Update
    suspend fun updateCurrentPlayingAudio(audio: CurrentPlayingLocalAudio)

    @Delete
    suspend fun deleteCurrentPlayingAudio(audio: CurrentPlayingLocalAudio)
}
