package com.template.api;

import com.template.model.pojo.SmartMeter;
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/smartMeter")
@Api(tags = {"SmartMeterControllerAPI"}, value = "水电表信息")
public interface SmartMeterControllerAPI {
    @PostMapping(value = "/insertSmartMeter")
    @ApiOperation(value = "添加水电表", notes = "添加水电表数据", httpMethod = "POST")
    CommonResult insertSmartMeter(@Validated @RequestBody SmartMeter smartApply, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartMeterById")
    @ApiOperation(value = "编辑水电表数据", notes = "编辑水电表数据", httpMethod = "POST")
    CommonResult updateSmartMeterById(@Validated @RequestBody SmartMeter ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartMeter")
    @ApiOperation(value = "水电表分页数据", notes = "水电表分页数据", httpMethod = "GET")
    CommonResult queryPageSmartMeters(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartMeterById")
    @ApiOperation(value = "根据ID删除指定水电表", notes = "根据ID删除指定水电表", httpMethod = "GET")
    CommonResult deleteSmartMeterById(@RequestParam int id);
}
