aboutsummaryrefslogtreecommitdiff
path: root/src/model/income.rs
blob: ef97b56509e1e0fd5b9d9f040d637f4630825e23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use chrono::NaiveDate;
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 date: NaiveDate,
}

#[derive(Debug)]
pub struct Update {
    pub user_id: i64,
    pub amount: i64,
    pub date: NaiveDate,
}