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/report.rs | |
parent | 371449b0e312a03162b78797b83dee9d81706669 (diff) |
Rewrite in Rust
Diffstat (limited to 'src/model/report.rs')
-rw-r--r-- | src/model/report.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/model/report.rs b/src/model/report.rs new file mode 100644 index 0000000..4858402 --- /dev/null +++ b/src/model/report.rs @@ -0,0 +1,16 @@ +use serde::Serialize; + +#[derive(Debug, sqlx::FromRow, Serialize)] +pub struct Report { + pub date: String, + pub name: String, + pub amount: i64, + pub action: Action, +} + +#[derive(Debug, PartialEq, Serialize, sqlx::Type)] +pub enum Action { + Created, + Updated, + Deleted, +} |