Mail queues.

This commit is contained in:
Burak Kaan Köse
2025-10-30 17:15:05 +01:00
parent b0ac6e4e55
commit 2d81d07c0a
13 changed files with 579 additions and 472 deletions
@@ -0,0 +1,19 @@
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 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;
}
@@ -33,6 +33,11 @@ public class MailAccount
/// </summary>
public MailProviderType ProviderType { get; set; }
/// <summary>
/// Gets or sets the initial mail sync status for the account.
/// </summary>
public InitialSynchronizationStatus SynchronizationStatus { get; set; }
/// <summary>
/// For tracking mail change delta.
/// Gmail : historyId