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.dict.ContainerConfigEntity

/**
 * 表 container_config Dao
 */
@Dao
interface ContainerConfigDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insContainer(vararg container: ContainerConfigEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insContainers(containers: List<ContainerConfigEntity>)

    @Query("select * from container_config")
    suspend fun getContainers(): List<ContainerConfigEntity>

    @Query("select * from container_config where container_code = :container")
    suspend fun getWidgetsByContainer(container: String): List<ContainerConfigEntity>

}