ds: add Transactiontype & Transatction definition
This commit is contained in:
parent
7e26a46e51
commit
8251bb315e
|
@ -0,0 +1,13 @@
|
|||
#[derive(PartialEq, Debug)]
|
||||
pub enum TransactionType { Sell, Buy }
|
||||
impl Default for TransactionType {
|
||||
fn default() -> Self { TransactionType::Buy }
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug)]
|
||||
pub struct Transaction {
|
||||
pub action_type: TransactionType,
|
||||
pub cost: i64,
|
||||
pub stocks_amount: i64,
|
||||
pub is_open: bool
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
pub mod account;
|
||||
pub mod asset;
|
||||
|
|
Loading…
Reference in New Issue
Block a user