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; use std::convert::TryFrom;
#[derive(Clone)]
pub struct Account { pub struct Account {
id: i64, id: i64,
name: String, name: String,

View File

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