package com.template.api;

import com.template.model.pojo.SmartSubject;
import com.template.model.pojo.SmartSubject;
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/smartSubject")
@Api(tags = {"SmartSubjectControllerAPI"}, value = "学科管理")
public interface SmartSubjectControllerAPI {
    @PostMapping(value = "/insertSmartSubject")
    @ApiOperation(value = "添加学科", notes = "添加学科数据", httpMethod = "POST")
    CommonResult insertSmartSubject(@Validated @RequestBody SmartSubject smartApply, BindingResult bindingResult);

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

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

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