package xyz.cottongin.radio247.data.db

import androidx.room.Dao
import androidx.room.Query
import androidx.room.Upsert
import xyz.cottongin.radio247.data.model.StationPreference

@Dao
interface StationPreferenceDao {
    @Query("SELECT * FROM station_preferences WHERE stationId = :stationId")
    suspend fun getByStationId(stationId: Long): StationPreference?

    @Upsert
    suspend fun upsert(pref: StationPreference)

    @Query("DELETE FROM station_preferences WHERE stationId = :stationId")
    suspend fun deleteByStationId(stationId: Long)
}
