feat(domain): add POP3 and OAuth2 credential fields to EmailAccount entity

This commit is contained in:
2026-08-17 10:14:18 +02:00
parent 6c698c95be
commit 194ae11a40

View File

@@ -72,4 +72,45 @@ public class EmailAccount
/// </summary>
[Column("IMAP_USE_SSL", TypeName = "bit")]
public bool ImapUseSsl { get; set; } = true;
/// <summary>
/// POP3 server hostname (e.g. "pop.example.com").
/// Leave empty when this account does not use POP3.
/// </summary>
[MaxLength(256)]
[Column("POP3_SERVER", TypeName = "nvarchar(256)")]
public string? Pop3Server { get; set; }
/// <summary>
/// POP3 server port (995 for SSL, 110 for plain).
/// </summary>
[Column("POP3_PORT", TypeName = "int")]
public int Pop3Port { get; set; } = 995;
/// <summary>
/// Use SSL/TLS when connecting to the POP3 server.
/// </summary>
[Column("POP3_USE_SSL", TypeName = "bit")]
public bool Pop3UseSsl { get; set; } = true;
/// <summary>
/// OAuth2 client ID (required when <see cref="UseOAuth2"/> is true).
/// </summary>
[MaxLength(512)]
[Column("OAUTH2_CLIENT_ID", TypeName = "nvarchar(512)")]
public string? OAuth2ClientId { get; set; }
/// <summary>
/// OAuth2 client secret (required when <see cref="UseOAuth2"/> is true).
/// </summary>
[MaxLength(512)]
[Column("OAUTH2_CLIENT_SECRET", TypeName = "nvarchar(512)")]
public string? OAuth2ClientSecret { get; set; }
/// <summary>
/// OAuth2 tenant ID (e.g. for Microsoft 365: tenant GUID or "common").
/// </summary>
[MaxLength(256)]
[Column("OAUTH2_TENANT_ID", TypeName = "nvarchar(256)")]
public string? OAuth2TenantId { get; set; }
}