package ink.wgink.module.activiti.service.activiti;

import ink.wgink.module.activiti.pojo.dtos.ModelDTO;
import ink.wgink.module.activiti.pojo.vos.ActivitiVO;
import ink.wgink.pojo.result.SuccessResultList;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IActivitiService
 * @Description: activiti
 * @Author: WangGeng
 * @Date: 2021/7/11 16:46
 * @Version: 1.0
 **/
public interface IActivitiService {

    /**
     * 新建模型
     *
     * @param activitiVO
     * @return
     * @throws UnsupportedEncodingException
     */
    String create(ActivitiVO activitiVO) throws UnsupportedEncodingException;


    /**
     * 发布模型
     *
     * @param modelId
     */
    void saveDeploy(String modelId) throws IOException;

    /**
     * 撤销发布模型
     *
     * @param modelId
     */
    void revokeDeploy(String modelId);

    /**
     * 模型列表
     *
     * @return
     */
    List<ModelDTO> list();

    /**
     * 模型列表
     *
     * @param modelCategory
     * @return
     */
    List<ModelDTO> listByCategory(String modelCategory);

    /**
     * 模型分页列表
     *
     * @param page
     * @param rows
     * @return
     */
    SuccessResultList<List<ModelDTO>> listPage(int page, int rows);

    /**
     * 模型分页列表
     *
     * @param modelCategory 类别
     * @param page
     * @param rows
     * @return
     */
    SuccessResultList<List<ModelDTO>> listPageByCategory(String modelCategory, int page, int rows);
}
