package com.cf.imes.module.system.api.process;

import com.cf.imes.module.system.api.process.dto.ProcessListReqDTO;
import com.cf.imes.module.system.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;


@FeignClient(name = ApiConstants.NAME) // TODO 晨丰：fallbackFactory =
@Tag(name = "RPC 服务 - 工序以及工序组")
public interface ProcessGroupApi {

    String PREFIX = ApiConstants.PREFIX + "/process-group";

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "工序组是否存在")
    @Parameter(name = "groupId", description = "工序组编号", required = true, example = "1024")
    Boolean getProcessGroup(@RequestParam("groupId") Long groupId);

    @GetMapping(PREFIX + "/getGroup")
    @Operation(summary = "工序组具体信息")
    @Parameter(name = "groupId", description = "工序组编号", required = true, example = "1024")
    ProcessListReqDTO getProcessGroupDetail(@RequestParam("groupId") Long groupId);

}
