finished making fn for entities

This commit is contained in:
thatscringebro 2025-11-12 11:14:07 -05:00
parent 6fda1192fa
commit 83281e9199
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,6 @@
use std::convert::TryFrom;
#[derive(Clone)]
pub struct Account {
id: i64,
name: String,

View File

@ -49,18 +49,19 @@ impl Transaction {
}
pub fn get_desc(&self) -> String {
return self.description;
return self.description.clone();
}
pub fn get_account(&self) -> Account {
return self.account;
return self.account.clone();
}
pub fn get_type(&self) -> TransactionType {
return self.tr_type;
return self.tr_type.clone();
}
}
#[derive(Clone)]
pub struct TransactionType {
id: i64,
description: String,