package com.template.api;

import com.template.model.request.insertCategoryRequest;
import com.template.model.request.updateCategoryRequest;
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.*;


@RequestMapping("/api/alumniCategory")
@Api(tags = {"AlumniCategoryController"}, value = "组织分类")
public interface AlumniCategoryControllerAPI {

    @PostMapping(value = "/insertCategory")
    @ApiOperation(value = "新增组织分类数据", notes = "新增组织分类数据", httpMethod = "POST")
    CommonResult insertCategory(@Validated @RequestBody insertCategoryRequest icr, BindingResult bindingResult);

    @PostMapping(value = "/updateCategory")
    @ApiOperation(value = "更新组织分类数据", notes = "更新组织分类数据", httpMethod = "POST")
    CommonResult updateCategory(@Validated @RequestBody updateCategoryRequest icr, BindingResult bindingResult);

    @GetMapping(value = "/deleteCategory")
    @ApiOperation(value = "删除组织分类数据", notes = "删除组织分类数据", httpMethod = "GET")
    CommonResult deleteCategory(@RequestParam int id);

    /**
     * @param currentPage   当前页
     * @param pageCount     一页数据条数
     * @param name          分类名称
     * @param userId        创建人
     * @param startTime     创建开始时间
     * @param endTime       创建结束时间
     * @return
     */
    @GetMapping(value = "/queryCategoryPage")
    @ApiOperation(value = "获取组织分类分页数据", notes = "获取组织分类分页数据", httpMethod = "GET")
    CommonResult queryCategoryPage( @RequestParam int currentPage, @RequestParam int pageCount, String name, Integer userId, String startTime, String endTime);



}
