namespace DigitalData.MessagingService.Application.Common.Dto; /// /// Represents an email message received via IMAP. /// public sealed record ReceivedEmailDto { /// /// Unique identifier of the message on the IMAP server (UID). /// #if NET public long Uid { get; init; } #else public long Uid { get; set; } #endif /// /// ID of the email account this message belongs to. /// #if NET public int AccountId { get; init; } #else public int AccountId { get; set; } #endif /// /// Sender address (From header). /// #if NET public string From { get; init; } = string.Empty; #else public string From { get; set; } = string.Empty; #endif /// /// Recipient addresses (To header). /// #if NET public IEnumerable To { get; init; } = []; #else public IEnumerable To { get; set; } = []; #endif /// /// CC addresses. /// #if NET public IEnumerable Cc { get; init; } = []; #else public IEnumerable Cc { get; set; } = []; #endif /// /// Email subject. /// #if NET public string Subject { get; init; } = string.Empty; #else public string Subject { get; set; } = string.Empty; #endif /// /// Plain-text body (may be empty when only HTML is present). /// #if NET public string TextBody { get; init; } = string.Empty; #else public string TextBody { get; set; } = string.Empty; #endif /// /// HTML body (may be empty when only plain-text is present). /// #if NET public string HtmlBody { get; init; } = string.Empty; #else public string HtmlBody { get; set; } = string.Empty; #endif /// /// Date/time the message was sent (Date header). /// #if NET public DateTime Date { get; init; } #else public DateTime Date { get; set; } #endif /// /// Attachments included with this message. /// #if NET public IEnumerable Attachments { get; init; } = []; #else public IEnumerable Attachments { get; set; } = []; #endif /// /// Whether the message has been marked as seen/read on the server. /// #if NET public bool IsSeen { get; init; } #else public bool IsSeen { get; set; } #endif #if NET public required string Folder { get; init; } #else public string Folder { get; set; } = null!; #endif }