package com.tencent.liteav.demo.superplayer.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.tencent.liteav.demo.superplayer.database.entity.CountDown
import kotlinx.coroutines.flow.Flow

@Dao
interface CountDownDao {

    @Query("SELECT * FROM countdown WHERE course_id = :courseId LIMIT 1")
    fun getCountDownByCourseId(courseId: String): Flow<CountDown?>

    @Insert
    fun insertCountDown(countDown: CountDown)
}