summaryrefslogtreecommitdiffstats
path: root/src/pagination.rs
blob: 8e61114aa1c579a0ec866f6eecb8a2ae5c5aa081 (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
use crate::model::models::ModelUser;
use crate::user::models::UserList;
use crate::warning::models::WarningUser;
use serde::{Deserialize, Serialize};

#[derive(Deserialize)]
pub struct Pagination {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub page: Option<i64>,
}

#[derive(Serialize)]
pub struct UserPagination {
    pub count: i64,
    pub results: Vec<UserList>,
}

#[derive(Serialize)]
pub struct ModelPagination {
    pub count: i64,
    pub results: Vec<ModelUser>,
}

#[derive(Serialize)]
pub struct WarningPagination {
    pub count: i64,
    pub results: Vec<WarningUser>,
}