aboutsummaryrefslogtreecommitdiff
path: root/src/app/store/records.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/store/records.rs')
-rw-r--r--src/app/store/records.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app/store/records.rs b/src/app/store/records.rs
index 024c06e..682f676 100644
--- a/src/app/store/records.rs
+++ b/src/app/store/records.rs
@@ -5,6 +5,8 @@ pub static ROUNDING_MODE: RoundingMode = RoundingMode::HalfEven;
/// Will use default precision (either 100 or ${RUST_BIGDECIMAL_DEFAULT_PRECISION})
pub static DECIMAL_CONTEXT: LazyLock<Context> = std::sync::LazyLock::new(|| Context::default().with_rounding_mode(ROUNDING_MODE));
+type DateTime = chrono::DateTime<chrono::Utc>;
+
/// Represents an account that holds equity. An account may hold equity with
/// multiple equity symbols.
pub struct FiduciaryAccount {
@@ -12,7 +14,7 @@ pub struct FiduciaryAccount {
pub fiduciary_account_number: usize,
pub fiduciary_account_name: String,
pub fiduciary_account_description: String,
- pub fiduciary_account_created_timestamp: chrono::DateTime<chrono::Utc>,
+ pub fiduciary_account_created_timestamp: DateTime,
}
/// An atomic enum to describe for what element of equity a symbol tracks
@@ -41,7 +43,7 @@ pub struct EquitySymbol {
pub equity_symbol_name: String,
pub equity_symbol_type: EquityType,
pub equity_symbol_managing_company: String,
- pub equity_symbol_created_timestamp: chrono::DateTime<chrono::Utc>,
+ pub equity_symbol_created_timestamp: DateTime,
}
/// An atomic enum to describe the basic action of an equity change event
@@ -82,7 +84,7 @@ pub struct EquityChangeEvent {
pub equity_change_quantity: BigDecimal,
pub equity_change_cost_basis: BigDecimal,
pub equity_change_type: ChangeEventType,
- pub equity_change_timestamp: chrono::DateTime<chrono::Utc>,
+ pub equity_change_timestamp: DateTime,
}
impl EquityChangeEvent {