package com.repair.api;

import com.repair.model.pojo.RepairEvaluate;
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.*;

import javax.servlet.http.HttpServletResponse;

@RequestMapping("/api/repairEvaluate")
@Api(tags = {"RepairEvaluateController"}, value = "评价")
public interface RepairEvaluateControllerAPI {

    @PostMapping(value = "/insertRepairEvaluate")
    @ApiOperation(value = "添加评价", notes = "添加评价数据", httpMethod = "POST")
    CommonResult InsertRepairEvaluate(@Validated @RequestBody RepairEvaluate repairEvaluate, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/queryPageRepairEvaluate")
    @ApiOperation(value = "评价分页数据", notes = "评价分页数据", httpMethod = "GET")
    CommonResult queryPageRepairEvaluates(@RequestParam int currentPage, @RequestParam int pageCount, String keyWord, String startTime, String endTime);

    @GetMapping(value = "/deleteRepairEvaluateById")
    @ApiOperation(value = "根据ID删除指定评价", notes = "根据ID删除指定评价", httpMethod = "GET")
    CommonResult deleteRepairEvaluateById(@RequestParam int id);

    @GetMapping(value = "/toRepairEvaluateExcel")
    @ApiOperation(value = "导出评价表单", notes = "导出评价表单", httpMethod = "GET")
    void toRepairEvaluateExcel(HttpServletResponse response, String keyWord, String startTime, String endTime);
}
