/*
 * Copyright (c) 2023 codvision.com All Rights Reserved.
 */

package com.codvision.workflow.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.codvision.workflow.entity.WorkFlowFormLink;
import com.codvision.workflow.entity.dto.WorkFlowFormLinkDTO;
import com.codvision.workflow.entity.vo.WorkFlowFormLinkVO;

import java.util.List;

/**
 * @author hxl
 */
public interface WorkFlowFormLinkService extends IService<WorkFlowFormLink> {

    /**
     * 添加关联信息
     * @param workFlowFormLinkDTO 参数
     */
    void addFormLink(WorkFlowFormLinkDTO workFlowFormLinkDTO);

    /**
     * 更新关联信息
     * @param workFlowFormLinkDTO 参数
     */
    void updateFormLink(WorkFlowFormLinkDTO workFlowFormLinkDTO);

    /**
     * 根据菜单ID获取表单信息
     * @param menuId 菜单ID
     * @return 关联信息
     */
    WorkFlowFormLinkVO getFormInfoByMenuId(Integer menuId);

    /**
     * 根据流程定义ID获取关联信息
     * @param definitionId 流程定义ID
     * @return 关联信息
     */
    List<WorkFlowFormLink> getByDefinitionId(String definitionId);

    /**
     * 根据流程定义key获取关联信息
     * @param definitionKey 流程定义key
     * @return 关联信息
     */
    List<WorkFlowFormLink> getByDefinitionKey(String definitionKey);

    /**
     * 根据流程定义key删除所有
     * @param definitionKey 流程定义key
     */
    void delAllByDefinitionKey(String definitionKey);

    /**
     * 根据流程定义ID删除所有
     * @param definitionId 流程定义ID
     */
    void delAllByDefinitionId(String definitionId);
}
