38 lines
1.5 KiB
Rust
38 lines
1.5 KiB
Rust
// file: ks-store/src/contracts/entity/ledger.rs
|
|
// version: 2
|
|
|
|
//! Processing ledger SQL-like entities.
|
|
|
|
/// Processing ledger SQL-like row contract.
|
|
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
|
|
pub struct ProcessingLedgerRow {
|
|
/// Technical primary key.
|
|
pub id: i64,
|
|
/// Processing stage name.
|
|
pub stage: std::string::String,
|
|
/// Processor implementation name.
|
|
pub processor_name: std::string::String,
|
|
/// Processor semantic version.
|
|
pub processor_version: std::string::String,
|
|
/// Stable input key, usually a transaction signature.
|
|
pub input_key: std::string::String,
|
|
/// Deterministic input hash.
|
|
pub input_hash: std::string::String,
|
|
/// Current processing status.
|
|
pub status: crate::ProcessingLedgerStatus,
|
|
/// Number of started attempts for this processor identity.
|
|
pub attempt_count: i32,
|
|
/// Optional start timestamp for the latest attempt.
|
|
pub started_at: std::option::Option<chrono::DateTime<chrono::Utc>>,
|
|
/// Optional finish timestamp for the latest terminal attempt.
|
|
pub finished_at: std::option::Option<chrono::DateTime<chrono::Utc>>,
|
|
/// Optional machine-readable error code.
|
|
pub error_code: std::option::Option<std::string::String>,
|
|
/// Optional diagnostic error message.
|
|
pub error_message: std::option::Option<std::string::String>,
|
|
/// Insert timestamp.
|
|
pub created_at: chrono::DateTime<chrono::Utc>,
|
|
/// Last update timestamp.
|
|
pub updated_at: chrono::DateTime<chrono::Utc>,
|
|
}
|