#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlockEntity {
#[serde(rename = "block_height")]
pub block_height: f32,
#[serde(rename = "current_height")]
pub current_height: f32,
#[serde(rename = "hash")]
pub hash: String,
#[serde(rename = "size")]
pub size: f32,
#[serde(rename = "timestamp")]
pub timestamp: f32,
#[serde(rename = "timestamp_utc")]
pub timestamp_utc: String,
#[serde(rename = "txs")]
pub txs: Vec<crate::models::TxnEntity>,
}
impl BlockEntity {
pub fn new(block_height: f32, current_height: f32, hash: String, size: f32, timestamp: f32, timestamp_utc: String, txs: Vec<crate::models::TxnEntity>) -> BlockEntity {
BlockEntity {
block_height,
current_height,
hash,
size,
timestamp,
timestamp_utc,
txs,
}
}
}