package com.template.api;

import com.template.model.pojo.SmartAuthority;
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/smartAuthority")
@Api(tags = {"SmartAuthorityControllerAPI"}, value = "权限管理")
public interface SmartAuthorityControllerAPI {
    @PostMapping(value = "/insertSmartAuthority")
    @ApiOperation(value = "添加权限管理", notes = "添加权限管理数据", httpMethod = "POST")
    CommonResult insertSmartAuthority(@Validated @RequestBody SmartAuthority smartApply, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartAuthorityById")
    @ApiOperation(value = "编辑权限管理数据", notes = "编辑权限管理数据", httpMethod = "POST")
    CommonResult updateSmartAuthorityById(@Validated @RequestBody SmartAuthority ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartAuthority")
    @ApiOperation(value = "权限管理分页数据", notes = "权限管理分页数据", httpMethod = "GET")
    CommonResult queryPageSmartAuthoritys(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartAuthorityById")
    @ApiOperation(value = "根据ID删除指定权限管理", notes = "根据ID删除指定权限管理", httpMethod = "GET")
    CommonResult deleteSmartAuthorityById(@RequestParam int id);
}
