package xn.hxp.room.dao.cabinet;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

import xn.hxp.room.bean.cabinet.CabinetDoorAdmin;

@Dao
public interface CabinetDoorAdminDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(CabinetDoorAdmin cabinetDoorAdmin);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(List<CabinetDoorAdmin> cabinetDoorList);


    @Query("SELECT * FROM cabinetDoorAdmin")
    List<CabinetDoorAdmin> getCabinetDoorAdminList();

    @Update
    void update(CabinetDoorAdmin cabinetDoorAdmin);

    @Delete
    void delete(CabinetDoorAdmin cabinetDoorAdmin);

    @Query("DELETE FROM cabinetDoorAdmin")
    void deleteAll();
}
