- Updated `ReadEnvelopeReceiverResponse` to use `ReadEnvelopeResponse` instead of `ReadReceiverResponse`. - Modified `ReadReceiverResponse` to include additional parameters in its constructor for better detail. - Introduced a new `ReadEnvelopeResponse` record with comprehensive properties and a computed `StatusName`.
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
|
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
|
|
using EnvelopeGenerator.Application.Receivers.Queries.Read;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Queries.Read;
|
|
|
|
/// <summary>
|
|
/// Stellt eine Antwort auf die Abfrage zum Lesen eines Envelope-Empfängers dar.
|
|
/// </summary>
|
|
/// <param name="Receiver">Der angeforderte Empfänger.</param>
|
|
public record ReadEnvelopeReceiverResponse(int UserId, int Status)
|
|
{
|
|
[NotMapped]
|
|
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
|
|
|
[Required]
|
|
public int EnvelopeId { get; init; }
|
|
|
|
[Required]
|
|
public int ReceiverId { get; init; }
|
|
|
|
public int Sequence { get; init; }
|
|
|
|
[TemplatePlaceholder("[NAME_RECEIVER]")]
|
|
public string? Name { get; init; }
|
|
|
|
public string? JobTitle { get; init; }
|
|
|
|
public string? CompanyName { get; init; }
|
|
|
|
public string? PrivateMessage { get; init; }
|
|
|
|
public DateTime AddedWhen { get; init; }
|
|
|
|
public DateTime? ChangedWhen { get; init; }
|
|
|
|
public bool HasPhoneNumber { get; init; }
|
|
|
|
[Required]
|
|
public required ReadEnvelopeResponse Envelope { get; init; }
|
|
|
|
[Required]
|
|
public required ReadReceiverResponse Receiver { get; init; }
|
|
} |