package com.template.api;

import com.template.model.pojo.SmartBuild;
import com.template.model.pojo.SmartBuildMeter;
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/smartBuildMeter")
@Api(tags = {"SmartBuildMeterControllerAPI"}, value = "楼栋水电表")
public interface SmartBuildMeterControllerAPI {
    @PostMapping(value = "/insertSmartBuildMeter")
    @ApiOperation(value = "添加楼栋水电表", notes = "添加楼栋水电表数据", httpMethod = "POST")
    CommonResult insertSmartBuildMeter(@Validated @RequestBody SmartBuildMeter smartApply, BindingResult bindingResult);

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

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

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