package com.framework.mvvm.model.db.dao

import androidx.room.*
import com.framework.mvvm.model.db.entity.ProblemArchEntity

/**
 * 表 problem_arch Dao
 */
@Dao
interface ProblemArchDao {
    @Query("select * from problem_arch")
    suspend fun getProblems(): List<ProblemArchEntity>

    @Query("select * from problem_arch where id = :id")
    suspend fun getProblemById(id: String): ProblemArchEntity

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

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

    @Delete
    suspend fun delProblem(problem: ProblemArchEntity)

}