From b3ab5a586592375fecff3dc94972e2e8fbb9447d Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 11 Aug 2023 10:15:59 -0700 Subject: [PATCH] Added file for holding table definitions --- src/db/mod.rs | 2 ++ src/db/tables/mod.rs | 9 +++++++++ src/main.rs | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/db/tables/mod.rs diff --git a/src/db/mod.rs b/src/db/mod.rs index f59cbac..71db374 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -4,3 +4,5 @@ pub use self::transaction::TransactionRecord; pub mod connection; pub use self::connection::DB; + +pub mod tables; diff --git a/src/db/tables/mod.rs b/src/db/tables/mod.rs new file mode 100644 index 0000000..c3b84e1 --- /dev/null +++ b/src/db/tables/mod.rs @@ -0,0 +1,9 @@ +use sqlx::FromRow; + + +#[derive(Clone, FromRow)] +pub struct Account { + pub acnt_id: i32, + pub acnt_dsply_name: String, + pub acnt_description: String, +} diff --git a/src/main.rs b/src/main.rs index f12a164..b407ba0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use ratatui::{ use recount::app::{App, AppResult}; use recount::tui::Tui; use recount::db::DB; -//use recount::db::transaction::TransactionRecord; +use recount::db::tables; #[tokio::main] async fn main() -> AppResult<()> {