shoc-backend/SeaHaven.DataServices/Interfaces/IWorkOrderIngestDataService.cs
Alexandre Brandizzi 306ab159cc Cancel pending uplifts when the legacy ingest cancels a work order
The ingest writes only the status text, so the shared helper gains a
status-text form of the same rule and the ingest stages the same
sync-attributed cancellation in its batch save.
2026-09-25 19:01:37 -03:00

18 lines
1 KiB
C#

using Data.SeaHavenIndustries;
namespace SeaHaven.DataServices.Interfaces
{
public interface IWorkOrderIngestDataService
{
Task<int> GetMaxWorkOrderIdAsync(CancellationToken cancellationToken);
Task<WorkOrder?> GetTrackedByExternalIdAsync(string externalWorkOrderId, CancellationToken cancellationToken);
void TrackWorkOrder(WorkOrder workOrder);
Task<Locations?> FindLocationAsync(string name, CancellationToken cancellationToken);
Task AddAndSaveLocationAsync(Locations location, CancellationToken cancellationToken);
// Stages (does not save) the sync-attributed cancellation of the work order's pending
// uplifts, each with its own audit row. See PendingUpliftCancellation.
Task<int> StageCancelPendingUpliftsAsync(int workOrderId, CancellationToken cancellationToken);
Task ExecuteTransactionalAsync(Func<CancellationToken, Task> work, CancellationToken cancellationToken);
Task SaveAsync(CancellationToken cancellationToken);
}
}