28 lines
1005 B
C#
28 lines
1005 B
C#
using EnvelopeGenerator.Application.Dto;
|
|
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
|
|
using MediatR;
|
|
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
|
|
|
/// <summary>
|
|
/// Befehl zur Erstellung eines Umschlags.
|
|
/// </summary>
|
|
/// <param name="Title">Der Titel des Umschlags. Dies ist ein Pflichtfeld.</param>
|
|
/// <param name="Message">Die Nachricht, die im Umschlag enthalten sein soll. Dies ist ein Pflichtfeld.</param>
|
|
/// <param name="TFAEnabled">Gibt an, ob die Zwei-Faktor-Authentifizierung für den Umschlag aktiviert ist. Standardmäßig false.</param>
|
|
public record CreateEnvelopeCommand(
|
|
[Required] string Title,
|
|
[Required] string Message,
|
|
bool TFAEnabled = false
|
|
) : IRequest<EnvelopeDto?>
|
|
{
|
|
/// <summary>
|
|
/// Id of receiver
|
|
/// </summary>
|
|
[JsonIgnore]
|
|
[BindNever]
|
|
public int? UserId { get; set; }
|
|
}; |