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

//! Analysis signal entity.

/// Persisted analysis signal row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct AnalysisSignalEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Signal kind.
    pub signal_kind: std::string::String,
    /// Signal severity stored as stable integer.
    pub severity: i16,
    /// Logical object key, for example a mint, signature or pool address.
    pub object_key: std::string::String,
    /// Optional related on-chain observation id.
    pub related_observation_id: std::option::Option<i64>,
    /// Optional numeric score.
    pub score: std::option::Option<f64>,
    /// JSON-encoded payload.
    pub payload_json: std::string::String,
    /// Creation timestamp encoded as RFC3339 UTC text.
    pub created_at: std::string::String,
}
