package com.repair.api;

import com.repair.model.pojo.RepairTransferRecord;
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/repairTransferRecord")
@Api(tags = {"repairTransferRecordController"}, value = "转单记录")
public interface RepairTransferRecordControllerAPI {

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

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

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

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