This commit is contained in:
2026-04-24 08:53:40 +02:00
parent a7030d7d0f
commit 54778373b8
31 changed files with 1706 additions and 164 deletions

View File

@@ -0,0 +1,30 @@
// file: kb_lib/src/db/entities/pool_listing.rs
//! Pool listing entity.
/// Persisted normalized pool listing row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct KbPoolListingEntity {
/// Numeric primary key.
pub id: i64,
/// Related DEX id.
pub dex_id: i64,
/// Related pool id.
pub pool_id: i64,
/// Optional related pair id.
pub pair_id: std::option::Option<i64>,
/// Discovery source family stored as stable integer.
pub source_kind: i16,
/// Optional source endpoint logical name.
pub source_endpoint_name: std::option::Option<std::string::String>,
/// Detection timestamp encoded as RFC3339 UTC text.
pub detected_at: std::string::String,
/// Optional initial base reserve estimate.
pub initial_base_reserve: std::option::Option<f64>,
/// Optional initial quote reserve estimate.
pub initial_quote_reserve: std::option::Option<f64>,
/// Optional initial price estimate in quote units.
pub initial_price_quote: std::option::Option<f64>,
/// Update timestamp encoded as RFC3339 UTC text.
pub updated_at: std::string::String,
}