package com.template.api;

import com.template.model.pojo.SmartDevice;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartDevice")
@Api(tags = {"SmartDeviceControllerAPI"}, value = "设备")
public interface SmartDeviceControllerAPI {
    @PostMapping(value = "/insertSmartDevice")
    @ApiOperation(value = "添加设备", notes = "添加设备数据", httpMethod = "POST")
    CommonResult insertSmartDevice(@Validated @RequestBody SmartDevice smartDevice, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartDeviceById")
    @ApiOperation(value = "编辑设备数据", notes = "编辑设备数据", httpMethod = "POST")
    CommonResult updateSmartDeviceById(@Validated @RequestBody SmartDevice ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartDevice")
    @ApiOperation(value = "设备分页数据", notes = "设备分页数据", httpMethod = "GET")
    CommonResult queryPageSmartDevices(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartDeviceById")
    @ApiOperation(value = "根据ID删除指定设备", notes = "根据ID删除指定设备", httpMethod = "GET")
    CommonResult deleteSmartDeviceById(@RequestParam int id);
}
