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

//! DEX entity.

/// Persisted normalized DEX row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct DexEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Stable short code.
    pub code: std::string::String,
    /// Display name.
    pub name: std::string::String,
    /// Optional primary program id.
    pub program_id: std::option::Option<std::string::String>,
    /// Optional router program id.
    pub router_program_id: std::option::Option<std::string::String>,
    /// Whether this DEX is enabled.
    pub is_enabled: i64,
    /// 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,
}
