ds: add Transactiontype & Transatction definition

This commit is contained in:
realaltffour 2020-06-14 15:10:06 +03:00
parent 7e26a46e51
commit 8251bb315e
No known key found for this signature in database
GPG Key ID: C1265D839D44DCB1
2 changed files with 14 additions and 0 deletions

View File

@ -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
}

View File

@ -1 +1,2 @@
pub mod account;
pub mod asset;