package com.template.api;

import com.template.model.pojo.SmartGrade;
import com.template.model.request.insertSmartGradeRequest;
import com.template.model.request.updateSmartGradeRequest;
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/smartGrade")
@Api(tags = {"SmartGradeControllerAPI"}, value = "年级")
public interface SmartGradeControllerAPI {
    @PostMapping(value = "/insertSmartGrade")
    @ApiOperation(value = "添加年级", notes = "添加年级数据", httpMethod = "POST")
    CommonResult insertSmartGrade(@Validated @RequestBody SmartGrade smartApply, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartGradeById")
    @ApiOperation(value = "编辑年级数据", notes = "编辑年级数据", httpMethod = "POST")
    CommonResult updateSmartGradeById(@Validated @RequestBody updateSmartGradeRequest ra, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/queryPageSmartGrade")
    @ApiOperation(value = "年级分页数据", notes = "年级分页数据", httpMethod = "GET")
    CommonResult queryPageSmartGrades(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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

    @GetMapping(value = "/querySmartGrades")
    @ApiOperation(value = "年级集合列表数据", notes = "年级集合列表数据", httpMethod = "GET")
    CommonResult querySmartGrades();

    @PostMapping(value = "/insertSmartGradeToBaisheng")
    @ApiOperation(value = "将年级数据添加到百胜系统", notes = "将年级数据添加到百胜系统", httpMethod = "POST")
    CommonResult insertSmartGradeToBaisheng(@Validated @RequestBody insertSmartGradeRequest isgr, BindingResult bindingResult) throws Exception;

}
