feat: add phase five operations foundation

This commit is contained in:
2026-07-28 09:57:50 +08:00
parent 71793a2de0
commit f22f329d33
39 changed files with 4810 additions and 160 deletions

View File

@@ -0,0 +1,22 @@
using System.Text.Json;
using Tiku.Application.Jobs;
namespace Tiku.Api.Contracts;
public sealed class CreateBackgroundJobDto
{
public string JobType { get; set; } = string.Empty;
public JsonElement Payload { get; set; }
public DateTimeOffset? RunAfter { get; set; }
public int MaxRetries { get; set; } = 3;
public CreateBackgroundJobCommand ToCommand(Guid tenantId)
{
return new CreateBackgroundJobCommand(
tenantId,
JobType,
Payload.ValueKind == JsonValueKind.Undefined ? JsonSerializer.SerializeToElement(new { }) : Payload,
RunAfter,
MaxRetries);
}
}