1
use serde::Deserialize;
2

            
3
204
#[derive(Deserialize)]
4
pub struct GetCountQuery {
5
    pub user: Option<String>,
6
    pub tfield: Option<String>,
7
    pub tstart: Option<i64>,
8
    pub tend: Option<i64>,
9
}
10

            
11
506
#[derive(Clone, Deserialize)]
12
pub struct GetListQuery {
13
    pub user: Option<String>,
14
    pub tfield: Option<String>,
15
    pub tstart: Option<i64>,
16
    pub tend: Option<i64>,
17
    pub offset: Option<u64>,
18
    pub limit: Option<u64>,
19
    pub sort: Option<String>,
20
    pub format: Option<ListFormat>,
21
}
22

            
23
16
#[derive(Clone, Deserialize, PartialEq)]
24
pub enum ListFormat {
25
    #[serde(rename = "array")]
26
    Array,
27
    #[serde(rename = "csv")]
28
    Csv,
29
    #[serde(rename = "data")]
30
    Data,
31
}