package com.template.api;

import com.template.model.request.insertDutiesRequest;
import com.template.model.request.updateDutiesRequest;
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/smartDuties")
@Api(tags = {"SmartDutiesControllerAPI"}, value = "职务")
public interface SmartDutiesControllerAPI {
    @PostMapping(value = "/insertSmartDuties")
    @ApiOperation(value = "添加职务", notes = "添加职务数据", httpMethod = "POST")
    CommonResult insertSmartDuties(@Validated @RequestBody insertDutiesRequest imr, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartDutiesById")
    @ApiOperation(value = "编辑职务数据", notes = "编辑职务数据", httpMethod = "POST")
    CommonResult updateSmartDutiesById(@Validated @RequestBody updateDutiesRequest ra, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/queryPageSmartDuties")
    @ApiOperation(value = "职务分页数据", notes = "职务分页数据", httpMethod = "GET")
    CommonResult queryPageSmartDutiess(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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

    @GetMapping(value = "/queryDutiesCategorys")
    @ApiOperation(value = "获取职务类型数据集合", notes = "获取职务类型数据集合", httpMethod = "GET")
    CommonResult queryDutiesCategorys();

    @GetMapping(value = "/queryDutiesByCategory")
    @ApiOperation(value = "获取职务数据集合", notes = "获取职务数据集合", httpMethod = "GET")
    CommonResult queryDutiesByCategory(@RequestParam int categoryId);

    @GetMapping(value = "/queryDutiesByIdentity")
    @ApiOperation(value = "根据身份ID获取职务数据集合", notes = "根据身份ID获取职务数据集合", httpMethod = "GET")
    CommonResult queryDutiesByIdentity(@RequestParam int identityId);

}
