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

//! Program instruction discriminator diagnostic row entity.

/// Raw row used to summarize instruction discriminators for one Solana program.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
pub struct ProgramInstructionDiscriminatorRowEntity {
    /// Parent transaction id.
    pub transaction_id: i64,
    /// Transaction signature.
    pub signature: std::string::String,
    /// Optional Solana slot.
    pub slot: std::option::Option<i64>,
    /// Internal instruction id.
    pub instruction_id: i64,
    /// Optional parent instruction id.
    pub parent_instruction_id: std::option::Option<i64>,
    /// Outer instruction index.
    pub instruction_index: i64,
    /// Optional inner instruction index.
    pub inner_instruction_index: std::option::Option<i64>,
    /// Optional program id.
    pub program_id: std::option::Option<std::string::String>,
    /// Optional stack height.
    pub stack_height: std::option::Option<i64>,
    /// Serialized accounts JSON.
    pub accounts_json: std::string::String,
    /// Optional serialized data JSON.
    pub data_json: std::option::Option<std::string::String>,
    /// Optional parsed instruction type.
    pub parsed_type: std::option::Option<std::string::String>,
    /// Optional decoded event id for this instruction.
    pub decoded_event_id: std::option::Option<i64>,
    /// Optional decoded event kind for this instruction.
    pub decoded_event_kind: std::option::Option<std::string::String>,
}
