#nullable enable
namespace Baya.Application.Models.Verification;

/// <summary>An admin step-type catalog row.</summary>
public record VerificationStepTypeDto(
    long Id,
    string Code,
    string DisplayName,
    string? Description,
    bool IsRequired,
    bool IsAutomated,
    string? AutomationProvider,
    int SortOrder,
    bool IsActive);

/// <summary>One step in the nurse's checklist. <c>Status</c> is a snake_case code. <c>IsRequired</c> mirrors
/// the step-type catalog — an optional step never blocks bookability.</summary>
public record VerificationStepDto(
    long Id,
    string Code,
    string DisplayName,
    string Status,
    bool IsAutomated,
    bool IsRequired,
    DateTimeOffset? ExpiresAt,
    string? FailureReason);

/// <summary>
/// The nurse's aggregate verification state + per-step checklist. <c>IsBookable</c> mirrors
/// <c>nurse_profiles.is_verified</c>; <c>BlockingSteps</c> lists the codes of required steps not yet passed
/// (what the nurse must still complete to become bookable).
/// </summary>
public record VerificationStatusDto(
    string Status,
    bool IsBookable,
    IReadOnlyList<string> BlockingSteps,
    IReadOnlyList<VerificationStepDto> Steps);

/// <summary>Uploaded-evidence metadata + a short-lived signed URL. Bytes never touch the DB.</summary>
public record VerificationDocumentDto(
    long Id,
    string ContentType,
    long FileSizeBytes,
    string? OriginalFileName,
    string Url);

/// <summary>A structured credential — the number is <b>never</b> serialized.</summary>
public record NurseCredentialDto(
    long Id,
    string CredentialType,
    string HolderNameSnapshot,
    string IssuingAuthority,
    DateOnly? IssuedAt,
    DateOnly? ExpiresAt,
    string VerificationMethod);

/// <summary>The public "verified" badge — credential <b>types</b> held, never the numbers.</summary>
public record TrustBadgeDto(
    long NurseId,
    bool IsVerified,
    DateTimeOffset? ApprovedAt,
    IReadOnlyList<string> CredentialTypes);
