diff options
| author | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-04-17 09:18:00 -0400 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-04-17 09:18:00 -0400 |
| commit | 754f2aab52542f0ff9097a9e7abe863d78b34779 (patch) | |
| tree | d1040b9b89f408b9869e718b2379abc47f4b0916 /src/app/store/records.rs | |
| parent | fb43ec916a6ebb4142717eca5a09829636f926bf (diff) | |
| download | equity-tracker-754f2aab52542f0ff9097a9e7abe863d78b34779.tar.gz equity-tracker-754f2aab52542f0ff9097a9e7abe863d78b34779.tar.bz2 equity-tracker-754f2aab52542f0ff9097a9e7abe863d78b34779.zip | |
Reroll
Diffstat (limited to 'src/app/store/records.rs')
| -rw-r--r-- | src/app/store/records.rs | 8 |
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 { |
