namespace JobTrackerApi.Models;

public sealed class MicrosoftGraphConnection
{
    public int Id { get; set; }
    public string OwnerUserId { get; set; } = "";
    public string MailAddress { get; set; } = "";
    public string EncryptedRefreshToken { get; set; } = "";
    public string? EncryptedAccessToken { get; set; }
    public DateTimeOffset? AccessTokenExpiresAt { get; set; }
    public string Scope { get; set; } = "";
    public DateTimeOffset ConnectedAt { get; set; } = DateTimeOffset.UtcNow;
    public DateTimeOffset? LastSyncedAt { get; set; }
    public DateTimeOffset? LastSyncAttemptedAt { get; set; }
    public DateTimeOffset? LastSyncSucceededAt { get; set; }
    public string? LastSyncMode { get; set; }
    public string? LastSyncSource { get; set; }
    public string? LastSyncStatus { get; set; }
    public string? LastSyncError { get; set; }
}
