package com.mcwl.resource.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.dto.AddRequestWorkFlow;
import com.mcwl.resource.domain.dto.ModelImagePageRes;
import com.mcwl.resource.domain.response.ResponseWorkFlow;
import com.mcwl.resource.domain.request.RequestWorkFlow;
import com.mcwl.resource.domain.vo.PageVo;

import java.util.List;

/**
 * 工作流 业务层
 * @author DaiZibo
 * @date 2025/1/9
 * @apiNote
 */

public interface WorkFlowService extends IService<WorkFlow> {
    R<Object> addWorkFlow(AddRequestWorkFlow addRequestWorkFlo);

    void updateWorkFlow(RequestWorkFlow requestWorkFlow);

    void deleteWorkFlow(Long id);

    R<Page<WorkFlow>> selectWorkFlow(PageVo pageVo);

    R<WorkFlow> selectWorkFlowById(Long id);

    TableDataInfo listByPage(ModelImagePageRes imagePageRes);


    void setworkFlowTop(Long id, boolean isTop);

    List<WorkFlow> fetchWorkFlowSortedByTopStatus();


    Long selectWorkFlowByName(String name);

    R<RequestWorkFlow> selectWorkFlowVersionById(Long id);

    PageInfo<ResponseWorkFlow> workFlowList(PageVo pageVo);

}
