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

package com.codvision.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.codvision.webcore.bean.QueryPage;
import com.codvision.workflow.entity.WorkFlowButton;

import java.util.List;

/**
 * @author hxl
 */
public interface WorkFlowButtonService extends IService<WorkFlowButton> {

    /**
     * 分页列表
     * @param queryPage 查询条件
     * @return 列表
     */
    IPage<WorkFlowButton> getPageResult(QueryPage<WorkFlowButton> queryPage);

    /**
     * 获取任务节点的按钮配置信息
     * @param taskId 任务ID
     * @return 列表
     */
    List<WorkFlowButton> getListByTaskId(String taskId);

    /**
     * 编辑
     * @param workFlowButton 参数
     * @return 布尔值
     */
    boolean updateButton(WorkFlowButton workFlowButton);

    /**
     * 根据按钮编码获取按钮信息
     * @param code 按钮编码
     * @return 按钮信息
     */
    WorkFlowButton getByCode(String code);
}
