diff options
author | Joris | 2023-04-17 20:56:53 +0200 |
---|---|---|
committer | Joris | 2023-04-17 20:56:53 +0200 |
commit | 3932daa26360d6e03807381d0b8ffa2d0e704847 (patch) | |
tree | 099f92c176ba783bccc5c307927e1effe7c2cd9c /src/model | |
parent | 8dcb9c6fff82f9e353e0f92b417dd803199f4257 (diff) |
Validate income date from body
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/income.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/model/income.rs b/src/model/income.rs index 7bc888f..ef97b56 100644 --- a/src/model/income.rs +++ b/src/model/income.rs @@ -1,3 +1,4 @@ +use chrono::NaiveDate; use serde::Serialize; #[derive(Debug, Clone, sqlx::FromRow, Serialize)] @@ -27,14 +28,12 @@ pub struct Form { pub struct Create { pub user_id: i64, pub amount: i64, - pub month: u32, - pub year: i32, + pub date: NaiveDate, } #[derive(Debug)] pub struct Update { pub user_id: i64, pub amount: i64, - pub month: u32, - pub year: i32, + pub date: NaiveDate, } |