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

//! Launch attribution entity.

/// Persisted launch attribution row.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct LaunchAttributionEntity {
    /// Numeric primary key.
    pub id: i64,
    /// Related launch surface id.
    pub launch_surface_id: i64,
    /// Related transaction id.
    pub transaction_id: i64,
    /// Related decoded event id.
    pub decoded_event_id: i64,
    /// Optional related pool id.
    pub pool_id: std::option::Option<i64>,
    /// Optional related pair id.
    pub pair_id: std::option::Option<i64>,
    /// Optional related matched key id.
    pub matched_key_id: std::option::Option<i64>,
    /// Decoded protocol name.
    pub protocol_name: std::string::String,
    /// Match kind used for attribution.
    pub match_kind: std::string::String,
    /// Matched value used for attribution.
    pub matched_value: std::string::String,
    /// Attribution timestamp encoded as RFC3339 UTC text.
    pub attributed_at: std::string::String,
    /// Update timestamp encoded as RFC3339 UTC text.
    pub updated_at: std::string::String,
}
