package cn.iocoder.yudao.module.bpm.api.oa;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.bpm.api.oa.vo.entry.BpmOAEntryDTO;
import cn.iocoder.yudao.module.bpm.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.security.PermitAll;
import java.time.LocalDate;
import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 流程实例")
public interface BpmOAEntryApi {

    String PREFIX = ApiConstants.PREFIX + "/oa/entry";

    @GetMapping(PREFIX + "/getEntryByTime")
    @Operation(summary = "获得指定入职时间的入职申请列表")
    @Parameter(name = "entryDate", description = "时间格式yyyy-MM-dd", required = true, example = "2024-05-11")
    @PermitAll
    CommonResult<List<BpmOAEntryDTO>> getEntryListByTime(@RequestParam(name = "entryDate") LocalDate entryDate);
}
