mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 14:13:12 +00:00
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
|
|
namespace SeaHaven.DataServices.Interfaces
|
||
|
|
{
|
||
|
|
public sealed class WeekRolledProcessOutcome
|
||
|
|
{
|
||
|
|
public bool Processed { get; init; }
|
||
|
|
public bool Skipped { get; init; }
|
||
|
|
public int OldCarriedOver { get; init; }
|
||
|
|
public int NewCarriedOver { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
public sealed class PastDueRefreshResult
|
||
|
|
{
|
||
|
|
public int SetCount { get; init; }
|
||
|
|
public int ClearedCount { get; init; }
|
||
|
|
public int ExaminedCount { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
public interface IWorkOrderDomainJobDataService
|
||
|
|
{
|
||
|
|
Task<IReadOnlyList<int>> GetWeekRolledCandidatesAsync(
|
||
|
|
DateOnly sourceWeekStart,
|
||
|
|
DateOnly sourceWeekEnd,
|
||
|
|
int batchSize = 500,
|
||
|
|
CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<WeekRolledProcessOutcome> TryProcessWeekRolledAsync(
|
||
|
|
int workOrderId,
|
||
|
|
DateOnly sourceWeekStart,
|
||
|
|
string correlationId,
|
||
|
|
CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<PastDueRefreshResult> RefreshPastDueFlagsAsync(
|
||
|
|
DateTime utcNow,
|
||
|
|
int batchSize = 500,
|
||
|
|
CancellationToken cancellationToken = default);
|
||
|
|
}
|
||
|
|
}
|