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

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.M2dEquipEntity

/**
 * table m2d_equip Dao
 */
@Dao
interface M2dEquipDao {
    @Query("select * from m2d_equip")
    suspend fun getM2ds(): List<M2dEquipEntity>

    @Query("select * from m2d_equip where id = :id")
    suspend fun getM2dById(id: String): M2dEquipEntity

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insM2d(vararg m2d: M2dEquipEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insM2ds(m2ds: List<M2dEquipEntity>)

    @Delete
    suspend fun delM2d(m2d: M2dEquipEntity)
}