20 lines
930 B
C#
20 lines
930 B
C#
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Threading.Tasks;
|
|
using LCU.Library.Internal.DispatcherModels.Entities;
|
|
namespace LCU.Api.Internal.DispatcherLib.Repositories;
|
|
|
|
public interface IWorkItemRepository
|
|
{
|
|
Task<IEnumerable<WorkItem>> ListAsync();
|
|
Task<WorkItem> FindByIdAsync(int id);
|
|
Task<IEnumerable<WorkItem>> FindByJobIdAsync(int jobId);
|
|
Task<IEnumerable<WorkItem>> FindByJobIdWithExecutionsAsync(int jobId, int numberOfWorkItemExecutions, int numberOfExecutionMessages);
|
|
Task<WorkItem> GetFirstOrDefaultWorkItemByJobId(int jobId);
|
|
Task<WorkItem> GetNextWorkItemByJobId(int jobId, int currentWorkItemOrder);
|
|
Task<WorkItem> GetTrackedWorkItem(int workItemId);
|
|
Task<WorkItem> AddAsync(WorkItem workItem);
|
|
void AddList(IEnumerable<WorkItem> workItems);
|
|
void Update(WorkItem workItem);
|
|
void RemoveList(IEnumerable<WorkItem> workItems);
|
|
} |