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

//! Transaction classification entity.

/// Persisted transaction classification row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct TransactionClassificationEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Related chain transaction id.
    pub transaction_id: i64,
    /// Transaction signature.
    pub signature: std::string::String,
    /// Optional Solana slot.
    pub slot: std::option::Option<i64>,
    /// Stable classification kind.
    pub classification_kind: std::string::String,
    /// Optional primary protocol name.
    pub primary_protocol: std::option::Option<std::string::String>,
    /// Optional primary program id.
    pub primary_program_id: std::option::Option<std::string::String>,
    /// Confidence level from 0 to 100.
    pub confidence_level: i64,
    /// Human-readable reason.
    pub reason: std::string::String,
    /// Serialized JSON evidence.
    pub evidence_json: std::string::String,
    /// Creation timestamp encoded as RFC3339 UTC text.
    pub created_at: std::string::String,
    /// Update timestamp encoded as RFC3339 UTC text.
    pub updated_at: std::string::String,
}
