namespace RealCV.Application.Models;

/// <summary>
/// Result of verifying a developer's GitHub profile
/// </summary>
public sealed record GitHubVerificationResult
{
    public required string ClaimedUsername { get; init; }
    public required bool IsVerified { get; init; }

    // Profile details
    public string? ProfileName { get; init; }
    public string? ProfileUrl { get; init; }
    public string? Bio { get; init; }
    public string? Company { get; init; }
    public string? Location { get; init; }
    public DateOnly? AccountCreated { get; init; }

    // Activity metrics
    public int PublicRepos { get; init; }
    public int Followers { get; init; }
    public int Following { get; init; }
    public int TotalContributions { get; init; }

    // Language breakdown
    public Dictionary<string, int> LanguageStats { get; init; } = new();

    // Claimed skills verification
    public List<SkillVerification> SkillVerifications { get; init; } = [];

    public string? VerificationNotes { get; init; }
    public List<GitHubVerificationFlag> Flags { get; init; } = [];
}

public sealed record SkillVerification
{
    public required string ClaimedSkill { get; init; }
    public required bool IsVerified { get; init; }
    public int RepoCount { get; init; }
    public int TotalLinesOfCode { get; init; }
    public DateOnly? FirstUsed { get; init; }
    public DateOnly? LastUsed { get; init; }
    public string? Notes { get; init; }
}

public sealed record GitHubVerificationFlag
{
    public required string Type { get; init; }
    public required string Severity { get; init; }
    public required string Message { get; init; }
    public int ScoreImpact { get; init; }
}
