Files
Wino-Mail/Wino.Core.Domain/Entities/Mail/MailItemQueue.cs
T
2025-10-31 00:51:27 +01:00

21 lines
641 B
C#

using System;
using SQLite;
namespace Wino.Core.Domain.Entities.Mail;
public class MailItemQueue
{
[PrimaryKey]
public Guid Id { get; set; }
public Guid AccountId { get; set; }
public string RemoteServerId { get; set; }
public string RemoteFolderId { get; set; } // For Outlook per-folder sync
public bool IsProcessed { get; set; }
public int FailedCount { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? ProcessedAt { get; set; }
public bool IsRecent() => (DateTime.UtcNow - CreatedAt).TotalDays <= 7;
public bool ShouldDelete() => IsProcessed || FailedCount >= 30;
}