package com.template.api;

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

    @PostMapping(value = "/updateSmartBuildById")
    @ApiOperation(value = "编辑楼栋数据", notes = "编辑楼栋数据", httpMethod = "POST")
    CommonResult updateSmartBuildById(@Validated @RequestBody SmartBuild ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartBuild")
    @ApiOperation(value = "楼栋分页数据", notes = "楼栋分页数据", httpMethod = "GET")
    CommonResult queryPageSmartBuilds(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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