package com.repair.api;

import com.repair.model.pojo.RepairDispatchRecord;
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/repairDispatchRecord")
@Api(tags = {"repairDispatchRecordController"}, value = "派单记录")
public interface RepairDispatchRecordControllerAPI {

    @PostMapping(value = "/insertRepairDispatchRecord")
    @ApiOperation(value = "添加派单记录", notes = "添加派单记录数据", httpMethod = "POST")
    CommonResult InsertRepairDispatchRecord(@Validated @RequestBody RepairDispatchRecord rc, BindingResult bindingResult);

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

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

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