package com.template.api;

import com.template.model.pojo.RepairAdmin;
import com.template.model.pojo.SystemMenu;
import com.template.model.request.freezeRepairAdminRequest;
import com.template.model.request.updateRepairAdminRequest;
import com.template.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/repairAdmin")
@Api(tags = {"RepairAdminController"}, value = "账号")
public interface RepairAdminControllerAPI {

    @PostMapping(value = "/insertRepairAdmin")
    @ApiOperation(value = "添加账号", notes = "添加账号数据", httpMethod = "POST")
    CommonResult InsertRepairAdmin(@Validated @RequestBody RepairAdmin repairAdmin, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairAdmins")
    @ApiOperation(value = "账号分页数据", notes = "账号分页数据", httpMethod = "POST")
    CommonResult queryPageRepairAdmins(@RequestParam int currentPage, @RequestParam int pageCount, String account, String phone, String userName);

    @PostMapping(value = "/freezeRepairAdminById")
    @ApiOperation(value = "根据ID冻结指定账号", notes = "根据ID冻结指定账户", httpMethod = "POST")
    CommonResult freezeRepairAdminById(@Validated @RequestBody freezeRepairAdminRequest frar, BindingResult bindingResult);

    @GetMapping(value = "/deleteRepairAdminById")
    @ApiOperation(value = "根据ID删除指定账号", notes = "根据ID删除指定账号", httpMethod = "POST")
    CommonResult deleteRepairAdminById(@RequestParam String id);

    @PostMapping(value = "/updateRepairAdminById")
    @ApiOperation(value = "编辑账号数据", notes = "编辑账号数据", httpMethod = "POST")
    CommonResult updateRepairAdminById(@Validated @RequestBody updateRepairAdminRequest ra, @RequestHeader("user_head") String userhead, BindingResult bindingResult);
}
