feat(data): add TaskRepository.ResetToManualAsync

This commit is contained in:
Mika Kuns
2026-04-21 17:26:01 +02:00
parent 88be19a231
commit 202236a45b
2 changed files with 40 additions and 0 deletions

View File

@@ -98,6 +98,17 @@ public sealed class TaskRepository
.SetProperty(t => t.Result, resultText), ct);
}
public async Task ResetToManualAsync(string taskId, CancellationToken ct = default)
{
await _context.Tasks
.Where(t => t.Id == taskId)
.ExecuteUpdateAsync(s => s
.SetProperty(t => t.Status, TaskStatus.Manual)
.SetProperty(t => t.StartedAt, (DateTime?)null)
.SetProperty(t => t.FinishedAt, (DateTime?)null)
.SetProperty(t => t.Result, (string?)null), ct);
}
#endregion
#region Tags