Mail queues.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user