package com.repair.api;

import com.repair.model.pojo.RepairRefundRecord;
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/repairRefundRecord")
@Api(tags = {"repairRefundRecordController"}, value = "退款记录")
public interface RepairRefundRecordControllerAPI {

    @PostMapping(value = "/insertRepairRefundRecord")
    @ApiOperation(value = "添加退款记录", notes = "添加退款记录数据", httpMethod = "POST")
    CommonResult insertRepairRefundRecord(@Validated @RequestBody RepairRefundRecord rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairRefundRecordById")
    @ApiOperation(value = "编辑退款记录数据", notes = "编辑退款记录数据", httpMethod = "POST")
    CommonResult updateRepairRefundRecordById(@Validated @RequestBody RepairRefundRecord rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairRefundRecord")
    @ApiOperation(value = "退款记录分页数据", notes = "退款记录分页数据", httpMethod = "GET")
    CommonResult queryPageRepairRefundRecords(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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