package com.repair.api;

import com.repair.model.pojo.RepairCollaborateRecord;
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/repairCollaborateRecord")
@Api(tags = {"repairCollaborateRecordController"}, value = "协作记录")
public interface RepairCollaborateRecordControllerAPI {

    @PostMapping(value = "/insertRepairCollaborateRecord")
    @ApiOperation(value = "添加协作记录", notes = "添加协作记录数据", httpMethod = "POST")
    CommonResult InsertRepairCollaborateRecord(@Validated @RequestBody RepairCollaborateRecord rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairCollaborateRecordById")
    @ApiOperation(value = "编辑协作记录数据", notes = "编辑协作记录数据", httpMethod = "POST")
    CommonResult updateRepairCollaborateRecordById(@Validated @RequestBody RepairCollaborateRecord rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairCollaborateRecord")
    @ApiOperation(value = "协作记录分页数据", notes = "协作记录分页数据", httpMethod = "GET")
    CommonResult queryPageRepairCollaborateRecords(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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