diff options
author | Joris | 2021-01-03 13:40:40 +0100 |
---|---|---|
committer | Joris | 2021-01-03 13:54:20 +0100 |
commit | 11052951b74b9ad4b6a9412ae490086235f9154b (patch) | |
tree | 64526ac926c1bf470ea113f6cac8a33158684e8d /src/model/income.rs | |
parent | 371449b0e312a03162b78797b83dee9d81706669 (diff) |
Rewrite in Rust
Diffstat (limited to 'src/model/income.rs')
-rw-r--r-- | src/model/income.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/model/income.rs b/src/model/income.rs new file mode 100644 index 0000000..7bc888f --- /dev/null +++ b/src/model/income.rs @@ -0,0 +1,40 @@ +use serde::Serialize; + +#[derive(Debug, Clone, sqlx::FromRow, Serialize)] +pub struct Stat { + pub date: String, + pub amount: i64, +} + +#[derive(Debug, Clone, sqlx::FromRow, Serialize)] +pub struct Table { + pub id: i64, + pub date: String, + pub user: String, + pub amount: i64, +} + +#[derive(Debug, Clone, sqlx::FromRow, Serialize)] +pub struct Form { + pub id: i64, + pub amount: i64, + pub user_id: i64, + pub month: i64, + pub year: i64, +} + +#[derive(Debug)] +pub struct Create { + pub user_id: i64, + pub amount: i64, + pub month: u32, + pub year: i32, +} + +#[derive(Debug)] +pub struct Update { + pub user_id: i64, + pub amount: i64, + pub month: u32, + pub year: i32, +} |