package com.repair.api;

import com.repair.model.pojo.RepairLeaveMessage;
import com.repair.model.request.repairLeaveMessageRequest;
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/repairLeaveMessage")
@Api(tags = {"repairLeaveMessageController"}, value = "消息留言")
public interface RepairLeaveMessageControllerAPI {

    @PostMapping(value = "/insertRepairLeaveMessage")
    @ApiOperation(value = "添加消息留言", notes = "添加消息留言数据", httpMethod = "POST")
    CommonResult insertRepairLeaveMessage(@Validated @RequestBody RepairLeaveMessage rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairLeaveMessageById")
    @ApiOperation(value = "编辑消息留言数据", notes = "编辑消息留言数据", httpMethod = "POST")
    CommonResult updateRepairLeaveMessageById(@Validated @RequestBody RepairLeaveMessage rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairLeaveMessage")
    @ApiOperation(value = "消息留言分页数据", notes = "消息留言分页数据", httpMethod = "GET")
    CommonResult queryPageRepairLeaveMessages(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteRepairLeaveMessageById")
    @ApiOperation(value = "根据ID删除指定消息留言", notes = "根据ID删除指定消息留言", httpMethod = "GET")
    CommonResult deleteRepairLeaveMessageById(@RequestParam int id);

    @PostMapping(value = "/transferToLogistics")
    @ApiOperation(value = "转后勤", notes = "转后勤", httpMethod = "POST")
    CommonResult transferToLogistics(@Validated @RequestBody repairLeaveMessageRequest rlmr, BindingResult bindingResult) throws Exception;
}
