package com.docus.server.api.segmentation;

import com.docus.infrastructure.web.request.SearchDTO;
import com.docus.infrastructure.web.response.PageResult;
import com.docus.server.dto.segmentation.ocrspecialruletest.AddOcrSpecialRuleTestDTO;
import com.docus.server.dto.segmentation.ocrspecialruletest.DeleteOcrSpecialRuleTestDTO;
import com.docus.server.dto.segmentation.ocrspecialruletest.EditOcrSpecialRuleTestDTO;
import com.docus.server.vo.segmentation.ocrspecialruletest.OcrSpecialRuleTestVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * 特殊策略表-调试 API
 *
 * @author AutoGenerator
 * @since 2023-08-29
 */
@FeignClient(value = "docus-segmentation", contextId = "docus-segmentation.OcrSpecialRuleTestApi")
@RequestMapping("/ocr/SpecialRuleTest")
public interface OcrSpecialRuleTestApi {

    /**
     * 按主键查询
     *
     * @param id 主键id
     * @return 实体
     */
    @GetMapping("/find/{id}")
    OcrSpecialRuleTestVO findById(@PathVariable(value = "id") Long id);

    /**
     * 查询所有
     *
     * @return 实体
     */
    @GetMapping("/findAll")
    List<OcrSpecialRuleTestVO> findAll();

    /**
     * 关键字搜索
     *
     * @param searchDTO 搜索参数
     * @return 分页列表
     */
    @PostMapping("/search")
    PageResult<OcrSpecialRuleTestVO> search(@RequestBody SearchDTO searchDTO);

    /**
     * 新增
     *
     * @param addOcrSpecialRuleTestDTO 新增参数
     */
    @PostMapping("/add")
    void add(@RequestBody AddOcrSpecialRuleTestDTO addOcrSpecialRuleTestDTO);

    /**
     * 编辑
     *
     * @param editOcrSpecialRuleTestDTO 编辑参数
     */
    @PutMapping("/edit")
    void edit(@RequestBody EditOcrSpecialRuleTestDTO editOcrSpecialRuleTestDTO);

    /**
     * 批量删除
     *
     * @param deleteOcrSpecialRuleTestDTO 删除参数
     * @return 成功或失败
     */
    @DeleteMapping("/delete")
    int delete(@RequestBody DeleteOcrSpecialRuleTestDTO deleteOcrSpecialRuleTestDTO);
}
