diff options
Diffstat (limited to 'src/model/category.rs')
-rw-r--r-- | src/model/category.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/model/category.rs b/src/model/category.rs new file mode 100644 index 0000000..de08dea --- /dev/null +++ b/src/model/category.rs @@ -0,0 +1,20 @@ +use serde::Serialize; + +#[derive(sqlx::FromRow, Serialize)] +pub struct Category { + pub id: i64, + pub name: String, + pub color: String, +} + +#[derive(Debug)] +pub struct Create { + pub name: String, + pub color: String, +} + +#[derive(Debug)] +pub struct Update { + pub name: String, + pub color: String, +} |