package com.repair.api;

import com.repair.model.pojo.RepairWorkType;
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/repairWorkType")
@Api(tags = {"RepairWorkTypeController"}, value = "工种")
public interface RepairWorkTypeControllerAPI {

    @PostMapping(value = "/insertRepairWorkType")
    @ApiOperation(value = "添加工种", notes = "添加工种数据", httpMethod = "POST")
    CommonResult InsertRepairWorkType(@Validated @RequestBody RepairWorkType rwt, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairWorkTypeById")
    @ApiOperation(value = "编辑工种数据", notes = "编辑工种数据", httpMethod = "POST")
    CommonResult updateRepairWorkTypeById(@Validated @RequestBody RepairWorkType rwt, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairWorkType")
    @ApiOperation(value = "工种分页数据", notes = "工种分页数据", httpMethod = "GET")
    CommonResult queryPageRepairWorkTypes(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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

    @GetMapping(value = "/getRepairWorkTypes")
    @ApiOperation(value = "查询工种列表", notes = "查询工种列表", httpMethod = "GET")
    CommonResult getRepairWorkTypes();

    @GetMapping(value = "/getReceivingState")
    @ApiOperation(value = "接单状态数据列表", notes = "接单状态数据列表", httpMethod = "GET")
    CommonResult getReceivingState();

    @GetMapping(value = "/getRepaairIdentitys")
    @ApiOperation(value = "查询身份列表", notes = "查询身份列表", httpMethod = "GET")
    CommonResult getRepairIdentitys();

}
