Started to implement account history.
This commit is contained in:
1 parent
20b5f32c71
commit
f4593df95b
8 files changed
+158
-10
No files matched your search
@@ -4,7 +4,7 @@ use crate::db::external_id::{AccountId, Id, SecurityId, UserId};
|
||||
use crate::util::{CustomResult, Error};
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use crate::db::accounts;
|
||||
use crate::db::{account_history, accounts};
|
||||
use crate::db::securities::Security;
|
||||
use crate::services::_securities::SecurityDTO;
|
||||
|
||||
@@ -22,6 +22,11 @@ pub struct AccountDTO {
|
||||
pub label: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct AccountHistoryDTO {
|
||||
|
||||
}
|
||||
|
||||
impl AccountDTO {
|
||||
fn from_entity(account: & Account) -> AccountDTO {
|
||||
AccountDTO{
|
||||
@@ -66,4 +71,10 @@ impl AccountService<'_> {
|
||||
let ret = &accounts::get_account_by_id(self.conn, account_id)?;
|
||||
Ok(AccountDTO::from_entity(ret))
|
||||
}
|
||||
|
||||
pub fn get_account_history_by_id(&self, account_id: &AccountId, user_id: &UserId) -> CustomResult<()> {
|
||||
let ret = account_history::get_account_history(self.conn, account_id)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user