package com.fs.his.mapper;

import com.fs.his.domain.FsAiWorkflowNode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * AI工作流节点Mapper接口
 *
 * @author fs
 * @date 2026-01-06
 */
public interface FsAiWorkflowNodeMapper {

    FsAiWorkflowNode selectFsAiWorkflowNodeById(Long nodeId);

    List<FsAiWorkflowNode> selectFsAiWorkflowNodeByWorkflowId(Long workflowId);

    /**
     * 根据工作流ID和节点类型列表查询节点
     */
    List<FsAiWorkflowNode> selectNodesByWorkflowIdAndTypes(@Param("workflowId") Long workflowId,
                                                           @Param("nodeTypes") List<String> nodeTypes);

    int insertFsAiWorkflowNode(FsAiWorkflowNode node);

    int batchInsertFsAiWorkflowNode(List<FsAiWorkflowNode> nodes);

    int updateFsAiWorkflowNode(FsAiWorkflowNode node);

    int deleteFsAiWorkflowNodeById(Long nodeId);

    int deleteFsAiWorkflowNodeByWorkflowId(Long workflowId);
}
