feat(SmsResponse): Erstellung eines Standardantwort-DTOs für SMS-Anfragen.

- GtxMessagingResponse für rohe dynamische Antwort erstellt.
 - Mapping-Profil hinzufügen
This commit is contained in:
Developer 02
2024-11-27 15:13:41 +01:00
parent 168c33bfea
commit 941b98b1a4
7 changed files with 61 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
namespace EnvelopeGenerator.Application.DTOs.Messaging
{
public record SmsResponse
{
public required bool Ok { get; init; }
public DateTime? AllowedAt { get; set; }
public TimeSpan AllowedAfter => Allowed ? TimeSpan.Zero : AllowedAt!.Value - DateTime.Now;
public bool Allowed => AllowedAt is null || DateTime.Now >= AllowedAt;
public bool Error => !Ok && Allowed;
public dynamic? Errors { get; init; }
}
}