using System.Linq.Expressions;
using Hotline.FlowEngine.Workflows;
using XF.Domain.Authentications;
using XF.Domain.Entities;

namespace Hotline.Repository.SqlSugar.DataPermissions;

public interface IDataPermissionFilterBuilder
{
    ISessionContext SessionContext { get; }
    IDataPermissionManager DataPermissionManager { get; }
    Expression<Func<TEntity, bool>> Build<TEntity>()
        where TEntity : class, IEntity<string>, IDataPermission, new();

    Expression<Func<TEntity, bool>> BuildWithFlowViewFilter<TEntity>()
        where TEntity : class, IEntity<string>, IDataPermission, IWorkflow, new();

    Expression<Func<TEntity, bool>> BuildWithFlowHandleFilter<TEntity>(bool canHandle)
        where TEntity : class, IEntity<string>, IDataPermission, IWorkflow, new();

    Expression<Func<TEntity, Workflow, bool>> BuildIncludeFlowData1<TEntity>()
        where TEntity : class, IEntity<string>, IDataPermission, IWorkflow, new();
}