using Microsoft.AspNetCore.Identity;

namespace JobTrackerApi.Models;

public sealed class ApplicationUser : IdentityUser
{
    public string? FirstName { get; set; }
    public string? LastName { get; set; }
    public string? DisplayName { get; set; }
    public string? PendingEmail { get; set; }
    public DateTimeOffset? PendingEmailRequestedAtUtc { get; set; }
    public string? ProfileCvText { get; set; }
    public string? ProfileCvStructureJson { get; set; }
    public int? CurrentCvUploadArtifactId { get; set; }
    public int? CurrentCvExtractionRunId { get; set; }
    public int? CurrentCvProfileVersion { get; set; }
    public string? AvatarImageDataUrl { get; set; }
    public string? GoogleSubject { get; set; }
    public string? GoogleEmail { get; set; }
    public DateTimeOffset? GoogleLinkedAt { get; set; }
    public string? MicrosoftSubject { get; set; }
    public string? MicrosoftTenantId { get; set; }
    public string? MicrosoftObjectId { get; set; }
    public string? MicrosoftEmail { get; set; }
    public DateTimeOffset? MicrosoftLinkedAt { get; set; }
    public string? TotpSecretEncrypted { get; set; }
    public string? TotpPendingSecretEncrypted { get; set; }
    public DateTimeOffset? TotpEnabledAtUtc { get; set; }
    public string? StripeCustomerId { get; set; }
    public string? StripeSubscriptionId { get; set; }
    public string? StripeSubscriptionStatus { get; set; }
    public DateTime? StripeLastEventCreatedUtc { get; set; }
    public bool AiEnabled { get; set; } = true;
    public bool ExternalAiProcessingAllowed { get; set; }
    public bool EmailFollowUpRemindersEnabled { get; set; } = true;
    // BCP 47 application UI preference. Null/legacy values safely fall back to English.
    public string? UiLanguage { get; set; }
    public string DeletionStatus { get; set; } = AccountDeletionStatuses.Active;
    public DateTimeOffset? DeletionRequestedAtUtc { get; set; }
}
