Refactor envelope and user query structures

- Introduced a new `UserQuery` record to encapsulate user-related information, replacing individual fields in `EnvelopeQuery`.
- Added a `ReferenceType` property in `EnvelopeHistoryQuery` to enhance reference handling logic.
- Modified `EnvelopeQuery` to use the new `UserQuery` structure, simplifying the data model.
- Updated `HistoryController` with a new constructor and restructured the `GetReferenceTypes` method.
- Introduced `ReadEnvelopeHistoryQuery` to allow for more specific envelope history queries.
- Overall improvements enhance code structure, clarity, and querying capabilities.
This commit is contained in:
Developer 02
2025-04-10 16:35:40 +02:00
parent 9f186afdff
commit 2cb5d0c0d5
5 changed files with 106 additions and 65 deletions

View File

@@ -0,0 +1,17 @@
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
using EnvelopeGenerator.Application.Receivers.Queries.Read;
namespace EnvelopeGenerator.Application.EnvelopeHistories.Queries.Read;
/// <summary>
/// Repräsentiert eine Abfrage für die Verlaufshistorie eines Umschlags.
/// </summary>
/// <param name="EnvelopeId">Die eindeutige Kennung des Umschlags.</param>
/// <param name="Envelope">Die Abfrage, die den Umschlag beschreibt.</param>
/// <param name="Receiver">Die Abfrage, die den Empfänger beschreibt.</param>
public record ReadEnvelopeHistoryQuery(
int EnvelopeId,
ReadEnvelopeQuery? Envelope,
ReadReceiverQuery? Receiver,
StatusQuery? Status)
: EnvelopeHistoryQuery<ReadEnvelopeQuery, ReadReceiverQuery>(EnvelopeId, Envelope, Receiver, Status);