package com.template.api;

import com.template.model.pojo.SmartIdentity;
import com.template.model.request.insertIdentityRequest;
import com.template.model.request.updateIdentityRequest;
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/smartIdentity")
@Api(tags = {"SmartIdentityControllerAPI"}, value = "身份")
public interface SmartIdentityControllerAPI {
    @PostMapping(value = "/insertSmartIdentity")
    @ApiOperation(value = "添加身份", notes = "添加身份数据", httpMethod = "POST")
    CommonResult insertSmartIdentity(@Validated @RequestBody insertIdentityRequest smartIdentity, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartIdentityById")
    @ApiOperation(value = "编辑身份数据", notes = "编辑身份数据", httpMethod = "POST")
    CommonResult updateSmartIdentityById(@Validated @RequestBody updateIdentityRequest ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartIdentity")
    @ApiOperation(value = "身份分页数据", notes = "身份分页数据", httpMethod = "GET")
    CommonResult queryPageSmartIdentitys(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartIdentityById")
    @ApiOperation(value = "根据ID删除指定身份", notes = "根据ID删除指定身份", httpMethod = "GET")
    CommonResult deleteSmartIdentityById(@RequestParam int id);

    @GetMapping(value = "/querySmartIdentitys")
    @ApiOperation(value = "获取身份集合", notes = "获取身份集合", httpMethod = "GET")
    CommonResult querySmartIdentitys();

    @GetMapping(value = "/queryIdentityApplyById")
    @ApiOperation(value = "根据身份ID查询应用权限", notes = "根据身份ID查询应用权限", httpMethod = "GET")
    CommonResult queryIdentityApplyById(@RequestParam int id);

}
