package com.template.api;

import com.template.model.pojo.SmartDataClass;
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.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartDataClass")
@Api(tags = {"SmartDataClassControllerAPI"}, value = "数据源类别")
public interface SmartDataClassControllerAPI {
    @PostMapping(value = "/insertSmartDataClass")
    @ApiOperation(value = "添加数据源类别", notes = "添加数据源类别数据", httpMethod = "POST")
    CommonResult insertSmartDataClass(@Validated @RequestBody SmartDataClass smartDataClass, HttpServletRequest httpServletRequest, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartDataClassById")
    @ApiOperation(value = "编辑数据源类别数据", notes = "编辑数据源类别数据", httpMethod = "POST")
    CommonResult updateSmartDataClassById(@Validated @RequestBody SmartDataClass smartDataClass, HttpServletRequest httpServletRequest, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartDataClass")
    @ApiOperation(value = "数据源类别分页数据", notes = "数据源类别分页数据", httpMethod = "GET")
    CommonResult queryPageSmartDataClass(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartDataClassById")
    @ApiOperation(value = "根据ID删除指定数据源类别", notes = "根据ID删除指定数据源类别", httpMethod = "GET")
    CommonResult deleteSmartDataClassById(@RequestParam int id, HttpServletRequest httpServletRequest);
}
