1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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, }