package com.template.api;

import com.template.model.pojo.SmartFreezeRecord;
import com.template.model.request.insertFreezeRecordRequest;
import com.template.model.request.manualFreezingRequest;
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.*;

/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartFreezeRecord")
@Api(tags = {"SmartFreezeRecordControllerAPI"}, value = "冻结记录")
public interface SmartFreezeRecordControllerAPI {
    @PostMapping(value = "/insertSmartFreezeRecord")
    @ApiOperation(value = "添加冻结记录", notes = "添加冻结记录数据", httpMethod = "POST")
    CommonResult insertSmartFreezeRecord(@Validated @RequestBody insertFreezeRecordRequest smartFreezeRequest, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartFreezeRecordById")
    @ApiOperation(value = "编辑冻结记录数据", notes = "编辑冻结记录数据", httpMethod = "POST")
    CommonResult updateSmartFreezeRecordById(@Validated @RequestBody SmartFreezeRecord ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartFreezeRecord")
    @ApiOperation(value = "冻结记录分页数据", notes = "冻结记录分页数据", httpMethod = "GET")
    CommonResult queryPageSmartFreezeRecords(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartFreezeRecordById")
    @ApiOperation(value = "根据ID删除指定冻结记录", notes = "根据ID删除指定冻结记录", httpMethod = "GET")
    CommonResult deleteSmartFreezeRecordById(@RequestParam int id);

    @PostMapping(value = "/manualFreezing")
    @ApiOperation(value = "手动冻结操作", notes = "手动冻结操作", httpMethod = "POST")
    CommonResult manualFreezing(@Validated @RequestBody manualFreezingRequest mfr, BindingResult bindingResult);

    @GetMapping(value = "/queryPageFreezeRecord")
    @ApiOperation(value = "已冻结名单分页数据", notes = "已冻结名单分页数据", httpMethod = "GET")
    CommonResult queryPageFreezeRecord(@RequestParam int currentPage, @RequestParam int pageCount);

    @GetMapping(value = "/thawFreezing")
    @ApiOperation(value = "手动解冻操作", notes = "手动解冻操作", httpMethod = "GET")
    CommonResult thawFreezing(@RequestParam int id);
}
