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

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

/**
 * 表 relation_dict Dao
 */
@Dao
interface RelationDictDao {
    @Query("select * from relation_dict")
    suspend fun getRelationDicts(): List<RelationDictEntity>

    @Query("select * from relation_dict where id = :id")
    suspend fun getRelationDictById(id: String): RelationDictEntity

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insRelationDict(vararg relationDict: RelationDictEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insRelationDicts(relationDicts: List<RelationDictEntity>)

    @Delete
    suspend fun delRelationDict(relationDict: RelationDictEntity)
}