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.ocrbasic.AddOcrBasicDTO;
import com.docus.server.dto.segmentation.ocrbasic.DeleteOcrBasicDTO;
import com.docus.server.dto.segmentation.ocrbasic.EditOcrBasicDTO;
import com.docus.server.vo.segmentation.ocrbasic.OcrBasicVO;
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.OcrBasicApi")
@RequestMapping("/ocr/Basic")
public interface OcrBasicApi {

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

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

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

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

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

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