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.CabinetDoorLock;

@Dao
public interface CabinetDoorLockDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(CabinetDoorLock cabinetDoorLock);

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


    @Query("SELECT * FROM cabinetDoorLock")
    List<CabinetDoorLock> getCabinetDoorLockList();

    @Update
    void update(CabinetDoorLock cabinetDoorLock);

    @Delete
    void delete(CabinetDoorLock cabinetDoorLock);

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