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:
@@ -6,15 +6,18 @@ namespace EnvelopeGenerator.Application.Envelopes;
|
||||
/// Repräsentiert eine Abfrage für Umschläge.
|
||||
/// </summary>
|
||||
/// <param name="Id">Die eindeutige Kennung des Umschlags.</param>
|
||||
/// <param name="UserId">Die Kennung des Benutzers, der den Umschlag erstellt hat.</param>
|
||||
/// <param name="Username">Der Benutzername des Benutzers, der den Umschlag erstellt hat.</param>
|
||||
/// <param name="Email">Die E-Mail-Adresse des Benutzers, der den Umschlag erstellt hat.</param>
|
||||
/// <param name="User">Absender des Schreibens</param>
|
||||
/// <param name="Status">Der Status des Umschlags.</param>
|
||||
/// <param name="Uuid">Die universell eindeutige Kennung des Umschlags.</param>
|
||||
public record EnvelopeQuery(
|
||||
int? Id = null,
|
||||
int? UserId = null,
|
||||
string? Username = null,
|
||||
string? Email = null,
|
||||
UserQuery? User = null,
|
||||
int? Status = null,
|
||||
string? Uuid = null) : IRequest;
|
||||
string? Uuid = null) : IRequest
|
||||
{
|
||||
public int? UserId => User?.Id;
|
||||
|
||||
public string? Username => User?.Username;
|
||||
|
||||
public string? UserEmail => User?.Username;
|
||||
};
|
||||
Reference in New Issue
Block a user