diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-28 13:22:53 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-28 13:30:27 +0100 |
| commit | 2361adeb0ca77904138e3466d51c2f44cf6df613 (patch) | |
| tree | f6e7192908f99fab62061913d8a1e9d2b918414b /schist_core/schist_models/src/transaction.rs | |
| parent | c7ed1e61ce2218be0b9e60577454124c4e43a366 (diff) | |
Tidier folders
Diffstat (limited to 'schist_core/schist_models/src/transaction.rs')
| -rw-r--r-- | schist_core/schist_models/src/transaction.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/schist_core/schist_models/src/transaction.rs b/schist_core/schist_models/src/transaction.rs new file mode 100644 index 0000000..9e983f5 --- /dev/null +++ b/schist_core/schist_models/src/transaction.rs @@ -0,0 +1,16 @@ +use derive_builder::Builder; +use diesel::prelude::{Associations, Identifiable, Insertable, Queryable, Selectable}; + +use crate::{account::Account, date_utc::DateUtc}; + +#[derive(Builder, Clone, Queryable, Identifiable, Selectable, Insertable, Associations, Debug, PartialEq)] +#[diesel(table_name = crate::schema::transactions)] +#[diesel(belongs_to(Account))] +pub struct Transaction { + pub id: i32, + pub description: String, + pub payee: String, + pub quantity: i32, + pub date: DateUtc, + pub account_id: i32, +} |
