package com.repair.api;

import com.repair.model.pojo.RepairReceiving;
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/repairReceiving")
@Api(tags = {"repairReceivingController"}, value = "接单记录")
public interface RepairReceivingControllerAPI {

    @PostMapping(value = "/insertRepairReceiving")
    @ApiOperation(value = "添加接单记录", notes = "添加接单记录数据", httpMethod = "POST")
    CommonResult insertRepairReceiving(@Validated @RequestBody RepairReceiving rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairReceivingById")
    @ApiOperation(value = "编辑接单记录数据", notes = "编辑接单记录数据", httpMethod = "POST")
    CommonResult updateRepairReceivingById(@Validated @RequestBody RepairReceiving rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairReceiving")
    @ApiOperation(value = "接单记录分页数据", notes = "接单记录分页数据", httpMethod = "GET")
    CommonResult queryPageRepairReceivings(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteRepairReceivingById")
    @ApiOperation(value = "根据ID删除指定接单记录", notes = "根据ID删除指定接单记录", httpMethod = "GET")
    CommonResult deleteRepairReceivingById(@RequestParam int id);
}
