summaryrefslogtreecommitdiff
path: root/backend/src/models/budget_update.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2024-09-17 11:28:56 +0100
committerJoe Carstairs <me@joeac.net>2024-09-17 11:28:56 +0100
commitf0e3e0cfb183253e03b1a61ddecb7b9330d47fdb (patch)
tree722eca369743dcfbb95f1efd58cc4cecc0fb8677 /backend/src/models/budget_update.rs
parentc737b6df94eae4981bb03dda3583e24046e24865 (diff)
Refactors backend
Diffstat (limited to 'backend/src/models/budget_update.rs')
-rw-r--r--backend/src/models/budget_update.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/src/models/budget_update.rs b/backend/src/models/budget_update.rs
index 3843455..ea93c16 100644
--- a/backend/src/models/budget_update.rs
+++ b/backend/src/models/budget_update.rs
@@ -2,13 +2,15 @@ use diesel::prelude::*;
use crate::models::category::Category;
-#[derive(Queryable, Identifiable, Selectable, Associations, Debug, PartialEq)]
+use super::date_time_utc::DateTimeUtc;
+
+#[derive(Clone, Queryable, Identifiable, Selectable, Associations, Debug, PartialEq)]
#[diesel(table_name = crate::schema::budget_updates)]
#[diesel(belongs_to(Category))]
pub struct BudgetUpdate {
pub id: i32,
pub category_id: i32,
- pub date: String,
+ pub date: DateTimeUtc,
pub new_budget: i32,
pub new_period: i32,
}