Refactor jobs to use EnvelopeDto/ReceiverDto instead of entities

Refactored ActionService and FinalizeDocumentJob to use EnvelopeDto and ReceiverDto in place of domain entities. Updated method signatures, internal logic, and envelope receiver handling to operate on DTOs. Improved logging, removed obsolete code, and added necessary using statements for DTO namespaces. Also updated document retrieval logic and removed null-conditional operator from actionService calls.
This commit is contained in:
2026-04-01 16:18:17 +02:00
parent 4caf8cd192
commit bc07af9622
2 changed files with 29 additions and 30 deletions

View File

@@ -1,4 +1,6 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.ServiceHost.Jobs;
@@ -10,25 +12,25 @@ namespace EnvelopeGenerator.ServiceHost.Jobs;
public class ActionService(IRepository<History> histRepo)
{
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
public bool CreateReport(Envelope envelope, CancellationToken cancel = default)
public bool CreateReport(EnvelopeDto envelope, CancellationToken cancel = default)
{
throw new NotImplementedException();
}
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
public bool FinalizeEnvelope(Envelope envelope, CancellationToken cancel = default)
public bool FinalizeEnvelope(EnvelopeDto envelope, CancellationToken cancel = default)
{
throw new NotImplementedException();
}
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
public bool CompleteEnvelope(Envelope envelope, CancellationToken cancel = default)
public bool CompleteEnvelope(EnvelopeDto envelope, CancellationToken cancel = default)
{
throw new NotImplementedException();
}
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
public bool CompleteEnvelope(Envelope envelope, Receiver receiver, CancellationToken cancel = default)
public bool CompleteEnvelope(EnvelopeDto envelope, ReceiverDto receiver, CancellationToken cancel = default)
{
throw new NotImplementedException();
}