package com.repair.api;

import com.repair.model.request.insertRepairShiftSettingRequest;
import com.repair.model.request.updateRepairShiftRequest;
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 java.text.ParseException;

@RequestMapping("/api/repairShiftSettings")
@Api(tags = {"RepairShiftSettingsController"}, value = "班次")
public interface RepairShiftSettingsControllerAPI {

    @PostMapping(value = "/insertRepairShiftSettings")
    @ApiOperation(value = "添加班次", notes = "添加班次数据", httpMethod = "POST")
    CommonResult InsertRepairShiftSettings(@Validated @RequestBody insertRepairShiftSettingRequest irssr, BindingResult bindingResult) throws ParseException;

    @PostMapping(value = "/updateRepairShiftSettingsById")
    @ApiOperation(value = "编辑班次数据", notes = "编辑班次数据", httpMethod = "POST")
    CommonResult updateRepairShiftSettingsById(@Validated @RequestBody updateRepairShiftRequest ra, BindingResult bindingResult) throws ParseException;

    @GetMapping(value = "/queryPageRepairShiftSettings")
    @ApiOperation(value = "班次分页数据", notes = "班次分页数据", httpMethod = "GET")
    CommonResult queryPageRepairShiftSettingss(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteRepairShiftSettingsById")
    @ApiOperation(value = "根据ID删除指定班次", notes = "根据ID删除指定班次", httpMethod = "GET")
    CommonResult deleteRepairShiftSettingsById(@RequestParam int id);
}
