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

//! Runtime event entity.

/// Persisted runtime event row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct DbRuntimeEventEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Event kind.
    pub event_kind: std::string::String,
    /// Severity level stored as stable integer.
    pub level: i16,
    /// Event source.
    pub source: std::string::String,
    /// Human-readable message.
    pub message: std::string::String,
    /// Creation timestamp encoded as RFC3339 UTC text.
    pub created_at: std::string::String,
}
