diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/store/records.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/app/store/records.rs b/src/app/store/records.rs index 3357a02..e7f30d2 100644 --- a/src/app/store/records.rs +++ b/src/app/store/records.rs @@ -10,10 +10,15 @@ type DateTime = chrono::DateTime<chrono::Utc>; /// Represents an account that holds equity. An account may hold equity with /// multiple equity symbols. pub struct FiduciaryAccount { + /// The internal ID of the fiduciary account pub fiduciary_account_id: u8, + /// The account number as defined by the fiduciary holder pub fiduciary_account_number: usize, + /// Representative name of the fiduciary account pub fiduciary_account_name: String, + /// A description of the fiduciary account pub fiduciary_account_description: String, + /// Estimated created date and time of the fiduciary account (does not need to be historically accurate, can be seeded from initial transaction recorded; is used relationally) pub fiduciary_account_created_timestamp: DateTime, } @@ -39,10 +44,15 @@ impl std::fmt::Display for EquityType { /// Represents a symbol used to ascribe speculative value pub struct EquitySymbol { + /// The internal ID of the equity symbol pub equity_symbol_id: usize, + /// The name of the equity symbol pub equity_symbol_name: String, + /// The basic type of the symbol, for broader categorization pub equity_symbol_type: EquityType, + /// The owning/managing company of the equity symbol pub equity_symbol_managing_company: String, + /// Estimated created date and time of the equity symbol (does not need to be historically accurate, can be seeded from initial transaction recorded; is used relationally) pub equity_symbol_created_timestamp: DateTime, } @@ -123,6 +133,19 @@ mod tests { } #[test] + fn equity_type_display() { + assert_eq!(EquityType::STOCK.to_string(), "STOCK"); + assert_eq!(EquityType::ETF.to_string(), "ETF"); + assert_eq!(EquityType::CRYPTO.to_string(), "CRYPTO"); + } + + #[test] + fn event_type_display() { + assert_eq!(ChangeEventType::BUY.to_string(), "BUY"); + assert_eq!(ChangeEventType::SELL.to_string(), "SELL"); + } + + #[test] fn event_type_score_buy() { let event_type = ChangeEventType::BUY; |
