package com.repair.api;

import com.repair.model.pojo.RepairSchool;
import com.repair.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/repairSchool")
@Api(tags = {"RepairSchoolController"}, value = "校区")
public interface RepairSchoolControllerAPI {

    @PostMapping(value = "/insertRepairSchool")
    @ApiOperation(value = "添加校区", notes = "添加校区数据", httpMethod = "POST")
    CommonResult InsertRepairSchool(@Validated @RequestBody RepairSchool repairSchool, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairSchoolById")
    @ApiOperation(value = "编辑校区数据", notes = "编辑校区数据", httpMethod = "POST")
    CommonResult updateRepairSchoolById(@Validated @RequestBody RepairSchool ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairSchool")
    @ApiOperation(value = "校区分页数据", notes = "校区分页数据", httpMethod = "GET")
    CommonResult queryPageRepairSchools(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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