aboutsummaryrefslogtreecommitdiff
path: root/src/model/category.rs
blob: de08deaa28dc2c5570d774ac9cdd59b5f02e0cdd (plain)
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,
}