1
use serde::Deserialize;
2

            
3
382
#[derive(Clone, Deserialize)]
4
pub struct GetCountQuery {
5
    pub unit: Option<String>,
6
    pub device: Option<String>,
7
    pub network: Option<String>,
8
    pub addr: Option<String>,
9
    pub profile: Option<String>,
10
    pub tfield: Option<String>,
11
    pub tstart: Option<i64>,
12
    pub tend: Option<i64>,
13
}
14

            
15
572
#[derive(Clone, Deserialize)]
16
pub struct GetListQuery {
17
    pub unit: Option<String>,
18
    pub device: Option<String>,
19
    pub network: Option<String>,
20
    pub addr: Option<String>,
21
    pub profile: Option<String>,
22
    pub tfield: Option<String>,
23
    pub tstart: Option<i64>,
24
    pub tend: Option<i64>,
25
    pub offset: Option<u64>,
26
    pub limit: Option<u64>,
27
    pub sort: Option<String>,
28
    pub format: Option<ListFormat>,
29
}
30

            
31
16
#[derive(Clone, Deserialize, PartialEq)]
32
pub enum ListFormat {
33
    #[serde(rename = "array")]
34
    Array,
35
    #[serde(rename = "csv")]
36
    Csv,
37
    #[serde(rename = "data")]
38
    Data,
39
}