package cn.sikey.tools.controller.app.firmware;

import cn.sikey.framework.common.pojo.CommonResult;
import cn.sikey.tools.controller.app.firmware.vo.FirmwareUpgradeRespVO;
import cn.sikey.tools.controller.app.firmware.vo.QueryFirmwareUpgradeReqVO;
import cn.sikey.tools.service.firmware.FirmwareService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: nelson
 * @Date: 2025/6/6
 * @Description: 固件
 */
@RestController
@RequestMapping("/tools/firmware")
@Slf4j
public class FirmwareController {

    @Resource
    private FirmwareService firmwareService;

    /**
     * 固件升级
     *
     * @param reqVO 固件升级
     * @return
     */
    @GetMapping("/queryFirmwareUpgrade")
    public CommonResult<List<FirmwareUpgradeRespVO>> queryFirmwareUpgrade(@Validated QueryFirmwareUpgradeReqVO reqVO) {
        return CommonResult.success(firmwareService.queryFirmwareUpgrade(reqVO));
    }
}
