package com.repair.api;

import com.repair.model.pojo.RepairClose;
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/repairClose")
@Api(tags = {"repairCloseController"}, value = "关单原因")
public interface RepairCloseControllerAPI {

    @PostMapping(value = "/insertRepairClose")
    @ApiOperation(value = "添加关单原因", notes = "添加关单原因数据", httpMethod = "POST")
    CommonResult InsertRepairClose(@Validated @RequestBody RepairClose rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairCloseById")
    @ApiOperation(value = "编辑关单原因数据", notes = "编辑关单原因数据", httpMethod = "POST")
    CommonResult updateRepairCloseById(@Validated @RequestBody RepairClose rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairClose")
    @ApiOperation(value = "关单原因分页数据", notes = "关单原因分页数据", httpMethod = "GET")
    CommonResult queryPageRepairCloses(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteRepairCloseById")
    @ApiOperation(value = "根据ID删除指定关单原因", notes = "根据ID删除指定关单原因", httpMethod = "GET")
    CommonResult deleteRepairCloseById(@RequestParam int id);

    @GetMapping(value = "/queryRepairCloses")
    @ApiOperation(value = "关单原因数据", notes = "关单原因数据", httpMethod = "GET")
    CommonResult queryRepairCloses();
}
