| | | 1 | | namespace Elsa.UserTasks.Persistence.EFCore.Contracts; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Low-level record adapter used by migration/reconciliation infrastructure. The public aggregate |
| | | 5 | | /// repository is implemented by the same EF repository below. |
| | | 6 | | /// </summary> |
| | | 7 | | public interface IUserTaskPersistenceAdapter |
| | | 8 | | { |
| | | 9 | | Task<UserTaskRecord?> GetAsync(string tenantId, string taskId, CancellationToken cancellationToken = default); |
| | | 10 | | |
| | | 11 | | Task<IReadOnlyCollection<UserTaskRecord>> QueryAsync( |
| | | 12 | | UserTaskPersistenceQuery query, |
| | | 13 | | CancellationToken cancellationToken = default); |
| | | 14 | | |
| | | 15 | | Task<bool> TryAddProjectionAsync( |
| | | 16 | | UserTaskRecord task, |
| | | 17 | | CancellationToken cancellationToken = default); |
| | | 18 | | |
| | | 19 | | Task<bool> TrySaveAsync( |
| | | 20 | | UserTaskRecord task, |
| | | 21 | | int expectedRevision, |
| | | 22 | | CancellationToken cancellationToken = default); |
| | | 23 | | } |
| | | 24 | | |
| | | 25 | | public sealed class UserTaskPersistenceQuery |
| | | 26 | | { |
| | 0 | 27 | | public string TenantId { get; init; } = default!; |
| | 0 | 28 | | public IReadOnlyCollection<Elsa.UserTasks.Models.UserTaskStatus> Statuses { get; init; } = []; |
| | 0 | 29 | | public string? AssigneeProvider { get; init; } |
| | 0 | 30 | | public string? AssigneeType { get; init; } |
| | 0 | 31 | | public string? AssigneeId { get; init; } |
| | 0 | 32 | | public string? Search { get; init; } |
| | 0 | 33 | | public int? Limit { get; init; } |
| | | 34 | | } |