Refactor: Aktualisierung von APIs und Anwendungsschichten zur Umsetzung von Änderungen im Bereich

This commit is contained in:
Developer 02
2025-05-28 12:55:11 +02:00
parent c1d46b446a
commit 3c60f31050
91 changed files with 1712 additions and 535 deletions

View File

@@ -2,23 +2,38 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
/// <summary>
///
/// </summary>
/// <param name="DateValid"></param>
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverReadOnlyCreateDto(
DateTime DateValid)
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverReadOnlyCreateDto(
DateTime DateValid)
{
[EmailAddress]
[Required]
public required string ReceiverMail { get; init; }
/// <summary>
///
/// </summary>
[EmailAddress]
[Required]
public required string ReceiverMail { get; init; }
[JsonIgnore]
public long? EnvelopeId { get; set; } = null;
/// <summary>
/// Default value is null
/// </summary>
[JsonIgnore]
public long? EnvelopeId { get; set; } = null;
[JsonIgnore]
public string? AddedWho { get; set; }
/// <summary>
///
/// </summary>
[JsonIgnore]
public string? AddedWho { get; set; }
[JsonIgnore]
public DateTime AddedWhen { get; } = DateTime.Now;
};
}
/// <summary>
/// Default value is DateTime.Now
/// </summary>
[JsonIgnore]
public DateTime AddedWhen { get; } = DateTime.Now;
};

View File

@@ -23,7 +23,7 @@ public class EnvelopeReceiverReadOnlyDto
/// <summary>
/// Gets or inits the email address of the receiver.
/// </summary>
public string ReceiverMail { get; set; }
public required string ReceiverMail { get; set; }
/// <summary>
/// Gets or inits the date until which the receiver is valid.
@@ -37,8 +37,9 @@ public class EnvelopeReceiverReadOnlyDto
/// <summary>
/// Gets or inits the user who added the receiver.
/// Default value is 'unknown'.
/// </summary>
public string AddedWho { get; init; }
public string AddedWho { get; init; } = "Unknown";
/// <summary>
/// Gets or inits the associated envelope details.

View File

@@ -1,5 +1,4 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
@@ -7,7 +6,7 @@ namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
/// Data Transfer Object for updating a read-only envelope receiver.
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class EnvelopeReceiverReadOnlyUpdateDto : IUnique<long>
public class EnvelopeReceiverReadOnlyUpdateDto
{
/// <summary>
/// Gets or sets the unique identifier of the envelope receiver.
@@ -21,8 +20,9 @@ public class EnvelopeReceiverReadOnlyUpdateDto : IUnique<long>
/// <summary>
/// Gets or sets the name of the user who made the change.
/// Default value is unknown.
/// </summary>
public string ChangedWho { get; set; }
public string ChangedWho { get; set; } = "Unknown";
/// <summary>
/// Gets or sets the date and time when the change was made.