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

import androidx.room.*
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.MajorDictEntity

/**
 * 表 major_dict Dao
 */
@Dao
interface MajorDictDao {
    @Query("select * from major_dict")
    suspend fun getMajors(): List<MajorDictEntity>

    @Query("select * from major_dict where id = :id")
    suspend fun getMajorById(id: String): MajorDictEntity

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insMajor(vararg major: MajorDictEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insMajors(majors: List<MajorDictEntity>)

    @Delete
    suspend fun delMajor(major: MajorDictEntity)

}