feat(application): add EmailAccount DTOs and Modification value object
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
namespace DigitalData.MessagingService.Application.Common.Dto.EmailAccounts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DTO for a single email account configuration.
|
||||||
|
/// </summary>
|
||||||
|
public record EmailAccountDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Logical name to identify this account (e.g. "default", "support").
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
#if NET
|
||||||
|
public required string Username { get; set; }
|
||||||
|
#else
|
||||||
|
public string Username { get; set; } = null!;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET
|
||||||
|
public required string SmtpServer { get; set; }
|
||||||
|
#else
|
||||||
|
public string SmtpServer { get; set; } = null!;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public int SmtpPort { get; set; }
|
||||||
|
|
||||||
|
public bool SmtpUseSsl { get; set; }
|
||||||
|
|
||||||
|
public bool UseOAuth2 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IMAP server hostname (e.g. "imap.example.com").
|
||||||
|
/// Leave empty when this account is send-only.
|
||||||
|
/// </summary>
|
||||||
|
public string? ImapServer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IMAP server port (993 for SSL, 143 for plain/STARTTLS).
|
||||||
|
/// </summary>
|
||||||
|
public int ImapPort { get; set; } = 993;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use SSL/TLS when connecting to the IMAP server.
|
||||||
|
/// </summary>
|
||||||
|
public bool ImapUseSsl { get; set; } = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
namespace DigitalData.MessagingService.Application.Common.Dto.EmailAccounts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DTO for a single email account configuration.
|
||||||
|
/// </summary>
|
||||||
|
public record EmailAccountModificationDto
|
||||||
|
{
|
||||||
|
#if NET
|
||||||
|
public required string Username { get; set; }
|
||||||
|
#else
|
||||||
|
public string Username { get; set; } = null!;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET
|
||||||
|
public required string Password { get; set; }
|
||||||
|
#else
|
||||||
|
public string Password { get; set; } = null!;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET
|
||||||
|
public required string SmtpServer { get; set; }
|
||||||
|
#else
|
||||||
|
public string SmtpServer { get; set; } = null!;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public int SmtpPort { get; set; }
|
||||||
|
|
||||||
|
public bool SmtpUseSsl { get; set; }
|
||||||
|
|
||||||
|
public bool UseOAuth2 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IMAP server hostname (e.g. "imap.example.com").
|
||||||
|
/// Leave empty when this account is send-only.
|
||||||
|
/// </summary>
|
||||||
|
public string? ImapServer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IMAP server port (993 for SSL, 143 for plain/STARTTLS).
|
||||||
|
/// </summary>
|
||||||
|
public int ImapPort { get; set; } = 993;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use SSL/TLS when connecting to the IMAP server.
|
||||||
|
/// </summary>
|
||||||
|
public bool ImapUseSsl { get; set; } = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace DigitalData.MessagingService.Application.Common.ValueObjects;
|
||||||
|
|
||||||
|
public enum Modification
|
||||||
|
{
|
||||||
|
Upsert
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user