using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Entity.WorkProcess;
using GxPress.Result.Process;
using Datory;

namespace GxPress.Repository.Interface.WorkProcess
{
    public interface IProcessRepository : IRepository
    {
        Task<int> InsertAsync(Process process);

        Task UpdateAsync(Process process);

        Task<Process> GetAsync(int processId);

        Task<bool> ExistsAsync(int id);

        Task<IEnumerable<Process>> GetListByDepartmentIdAsync(int departmentId);

        Task<IEnumerable<Process>> GetListAsync(string keyword);

        Task<IEnumerable<Process>> GetListByGroupIdAsync(int groupId);

        /// <summary>
        /// ��ȡ���̻�������
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ProcessBaseInfoResult> GetBaseInfoAsync(int id);

        /// <summary>
        /// ��ȡ���̱�������
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<ProcessFormSettingResult>> GetFormSettingAsync(int id);

        /// <summary>
        /// ��ȡ���̽ڵ���
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ProcessNodeTreeResult> GetNodeTreeAsync(int id);

        Task<bool> DeleteAsync(int id);

        Task<IEnumerable<Process>> GetAllAsync(SqlKata.Query query);
    }
}