31 lines
1.1 KiB
Rust
31 lines
1.1 KiB
Rust
// 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,
|
|
}
|