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/alumniCategoryNews")
@Api(tags = {"AlumniCategoryNewsController"}, value = "新闻分类")
public interface AlumniCategoryNewsControllerAPI {

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

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

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

    /**
     * @param currentPage   当前页
     * @param pageCount     一页数据条数
     * @param startTime     创建开始时间
     * @param endTime       创建结束时间
     * @return
     */
    @GetMapping(value = "/queryCategoryNewsPage")
    @ApiOperation(value = "获取新闻分类分页数据", notes = "获取新闻分类分页数据", httpMethod = "GET")
    CommonResult queryCategoryNewsPage(@RequestParam int currentPage, @RequestParam int pageCount, String startTime, String endTime);


    @GetMapping(value = "/queryCategoryNewss")
    @ApiOperation(value = "获取新闻分类下拉列表数据", notes = "获取新闻分类下拉列表数据", httpMethod = "GET")
    CommonResult queryCategoryNewss();

}
