using System.Collections.Generic;
using System.Threading.Tasks;
using Datory;

namespace GxPress.Repository.Interface.FlowAttachment
{
    public interface IFlowAttachmentRepository : IRepository
    {
        Task<Entity.WorkFlow.FlowAttachment> GetAsync(int id);

        Task<Entity.WorkFlow.FlowAttachment> GetAsync(SqlKata.Query query);
        Task<IEnumerable<Entity.WorkFlow.FlowAttachment>> GetAllAsync(SqlKata.Query query);
        Task<bool> DeleteAsync(SqlKata.Query query);
        Task<int> InsertAsync(Entity.WorkFlow.FlowAttachment flowAttachment);

        Task<bool> UpdateAsync(Entity.WorkFlow.FlowAttachment flowAttachment);
        Task<bool> UpdateAsync(SqlKata.Query query);
        /// <summary>
        /// 添加工作流附件
        /// </summary>
        /// <param name="flowAttachments"></param>
        /// <returns></returns>
        Task<bool> InsertsAsync(List<Entity.WorkFlow.FlowAttachment> flowAttachments);
        Task<bool> DeleteAllAsync(int flowId);
        Task<IEnumerable<Entity.WorkFlow.FlowAttachment>> GetAllAsync(int flowId);
    }
}