package com.multictrl.modules.business.service;

import com.multictrl.common.service.CrudService;
import com.multictrl.modules.business.dto.DockDeviceDTO;
import com.multictrl.modules.business.dto.FirmwareDTO;
import com.multictrl.modules.business.dto.firmware.FirmwareVersion;
import com.multictrl.modules.business.entity.FirmwareEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 固件表
 *
 * @author Sdy
 * @since 1.0.0 2026-05-11
 */
public interface FirmwareService extends CrudService<FirmwareEntity, FirmwareDTO> {

    //获取设备固件
    List<FirmwareDTO> getFirmwareList(String dockSn);

    //保存固件
    void uploadFirmware(MultipartFile file, String deviceName, String remark);

    //删除固件
    void deleteFirmware(Long[] ids);

    //固件升级
    String ota(String dockSn, Long firmwareId);

    //设备列表
    List<DockDeviceDTO> registerDevices();

    //获取当前固件版本
    FirmwareVersion getCurrentFirmwareVersion(String dockSn);

}