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

//! Pool token composition entity.

/// Persisted normalized pool token composition row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct PoolTokenEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Related pool id.
    pub pool_id: i64,
    /// Related token id.
    pub token_id: i64,
    /// Token role stored as stable integer.
    pub role: i16,
    /// Optional vault address.
    pub vault_address: std::option::Option<std::string::String>,
    /// Optional token order inside the pool.
    pub token_order: std::option::Option<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,
}
