44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using DigitalData.Core.Abstraction.Application.Repository;
|
|
using EnvelopeGenerator.Application.Dto;
|
|
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
|
using MediatR;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
|
|
|
/// <summary>
|
|
/// Befehl zur Erstellung eines Umschlags.
|
|
/// </summary>
|
|
public record CreateEnvelopeCommand : IRequest<EnvelopeDto?>
|
|
{
|
|
/// <summary>
|
|
/// Der Titel des Umschlags. Dies ist ein Pflichtfeld.
|
|
/// </summary>
|
|
[Required]
|
|
public required string Title { get; set; }
|
|
|
|
/// <summary>
|
|
/// Die Nachricht, die im Umschlag enthalten sein soll. Dies ist ein Pflichtfeld.
|
|
/// </summary>
|
|
[Required]
|
|
public required string Message { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gibt an, ob die Zwei-Faktor-Authentifizierung für den Umschlag aktiviert ist. Standardmäßig false.
|
|
/// </summary>
|
|
public bool TFAEnabled { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// ID des Absenders
|
|
/// </summary>
|
|
public int UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// if true, use <seealso cref="IEnvelopeExecutor"/>; otherwise, use <seealso cref="IRepository{Envelope}"/>
|
|
/// </summary>
|
|
[JsonIgnore]
|
|
[NotMapped]
|
|
public bool UseSQLExecutor { get; set; } = true;
|
|
} |