// file: kb_lib/src/db/entities/protocol_candidate_summary.rs

//! Protocol candidate summary entity.

/// Aggregated protocol candidate diagnostic row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct ProtocolCandidateSummaryEntity {
    /// Program id observed in protocol candidates.
    pub program_id: std::string::String,
    /// Optional program name hint.
    pub program_name_hint: std::option::Option<std::string::String>,
    /// Optional candidate protocol.
    pub candidate_protocol: std::option::Option<std::string::String>,
    /// Optional candidate surface.
    pub candidate_surface: std::option::Option<std::string::String>,
    /// Candidate reason.
    pub reason: std::string::String,
    /// Number of candidate rows.
    pub occurrence_count: i64,
    /// Number of distinct transactions.
    pub transaction_count: i64,
    /// Latest observed slot.
    pub last_slot: std::option::Option<i64>,
    /// Latest candidate row id in this group.
    pub latest_candidate_id: i64,
    /// Latest signature in this group.
    pub latest_signature: std::string::String,
    /// Latest candidate creation timestamp encoded as RFC3339 UTC text.
    pub latest_created_at: std::string::String,
}
