package com.usky.ai.mapper;

import com.usky.ai.domain.AiDevice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AiDeviceMapper {

    void insertDevice(AiDevice device);

    void updateDevice(AiDevice device);

    void saveOrUpdateDevice(AiDevice device);

    void updateDeviceStatus();

    List<AiDevice> getDevices(@Param("boardId") String boardId, @Param("offset") int offset, @Param("limit") int limit);

    long getTotalDevices(@Param("boardId") String boardId);

    void deleteDevice(@Param("boardId") String boardId);

    boolean checkExists(@Param("boardId") String boardId, @Param("boardIp") String boardIp);
}
