From 194ae11a409d56bc077b2c42d70cb33377c68513 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 17 Aug 2026 10:14:18 +0200 Subject: [PATCH] feat(domain): add POP3 and OAuth2 credential fields to EmailAccount entity --- .../Entities/EmailAccount.cs | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/core/DigitalData.MessagingService.Domain/Entities/EmailAccount.cs b/src/core/DigitalData.MessagingService.Domain/Entities/EmailAccount.cs index f8bab17..997fdc5 100644 --- a/src/core/DigitalData.MessagingService.Domain/Entities/EmailAccount.cs +++ b/src/core/DigitalData.MessagingService.Domain/Entities/EmailAccount.cs @@ -72,4 +72,45 @@ public class EmailAccount /// [Column("IMAP_USE_SSL", TypeName = "bit")] public bool ImapUseSsl { get; set; } = true; + + /// + /// POP3 server hostname (e.g. "pop.example.com"). + /// Leave empty when this account does not use POP3. + /// + [MaxLength(256)] + [Column("POP3_SERVER", TypeName = "nvarchar(256)")] + public string? Pop3Server { get; set; } + + /// + /// POP3 server port (995 for SSL, 110 for plain). + /// + [Column("POP3_PORT", TypeName = "int")] + public int Pop3Port { get; set; } = 995; + + /// + /// Use SSL/TLS when connecting to the POP3 server. + /// + [Column("POP3_USE_SSL", TypeName = "bit")] + public bool Pop3UseSsl { get; set; } = true; + + /// + /// OAuth2 client ID (required when is true). + /// + [MaxLength(512)] + [Column("OAUTH2_CLIENT_ID", TypeName = "nvarchar(512)")] + public string? OAuth2ClientId { get; set; } + + /// + /// OAuth2 client secret (required when is true). + /// + [MaxLength(512)] + [Column("OAUTH2_CLIENT_SECRET", TypeName = "nvarchar(512)")] + public string? OAuth2ClientSecret { get; set; } + + /// + /// OAuth2 tenant ID (e.g. for Microsoft 365: tenant GUID or "common"). + /// + [MaxLength(256)] + [Column("OAUTH2_TENANT_ID", TypeName = "nvarchar(256)")] + public string? OAuth2TenantId { get; set; } } \ No newline at end of file