package com.ys.bdtp.adm.mvvm.model.db.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.ys.bdtp.adm.mvvm.model.db.entity.task.ProblemEntity

/**
 * problem 表访问接口
 *
 * @author bai
 */
@Dao
interface ProblemDao {

    @Query("select * from problem")
    fun getProblems(): List<ProblemEntity>

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insProblem(problem: ProblemEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insProblems(problems: List<ProblemEntity>)
}