package com.repair.api;

import com.repair.model.pojo.RepairTrackRecord;
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/repairTrackRecord")
@Api(tags = {"repairTrackRecordController"}, value = "跟踪记录")
public interface RepairTrackRecordControllerAPI {

    @PostMapping(value = "/insertRepairTrackRecord")
    @ApiOperation(value = "添加跟踪记录", notes = "添加跟踪记录数据", httpMethod = "POST")
    CommonResult insertRepairTrackRecord(@Validated @RequestBody RepairTrackRecord rc, BindingResult bindingResult);

    @PostMapping(value = "/updaterepairTrackRecordById")
    @ApiOperation(value = "编辑跟踪记录数据", notes = "编辑跟踪记录数据", httpMethod = "POST")
    CommonResult updateRepairTrackRecordById(@Validated @RequestBody RepairTrackRecord rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPagerepairTrackRecord")
    @ApiOperation(value = "跟踪记录分页数据", notes = "跟踪记录分页数据", httpMethod = "GET")
    CommonResult queryPageRepairTrackRecords(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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