package com.template.api;

import com.template.model.pojo.SmartSemester;
import com.template.model.pojo.SmartSemester;
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/smartSemester")
@Api(tags = {"SmartSemesterControllerAPI"}, value = "学期管理")
public interface SmartSemesterControllerAPI {
    @PostMapping(value = "/insertSmartSemester")
    @ApiOperation(value = "添加学期", notes = "添加学期数据", httpMethod = "POST")
    CommonResult insertSmartSemester(@Validated @RequestBody SmartSemester smartApply, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/testSmartSemester")
    @ApiOperation(value = "添加学期", notes = "添加学期数据", httpMethod = "GET")
    CommonResult testSmartSemester(int id) throws Exception;

    @PostMapping(value = "/updateSmartSemesterById")
    @ApiOperation(value = "编辑学期数据", notes = "编辑学期数据", httpMethod = "POST")
    CommonResult updateSmartSemesterById(@Validated @RequestBody SmartSemester ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartSemester")
    @ApiOperation(value = "学期分页数据", notes = "学期分页数据", httpMethod = "GET")
    CommonResult queryPageSmartSemesters(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartSemesterById")
    @ApiOperation(value = "根据ID删除指定学期", notes = "根据ID删除指定学期", httpMethod = "GET")
    CommonResult deleteSmartSemesterById(@RequestParam int id);
}
