use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaginationInfo {
#[serde(rename = "total_items")]
pub total_items: i32,
#[serde(rename = "total_pages")]
pub total_pages: i32,
#[serde(rename = "current_page")]
pub current_page: i32,
#[serde(rename = "page_size")]
pub page_size: i32,
#[serde(rename = "has_more")]
pub has_more: bool,
}
impl PaginationInfo {
pub fn new(total_items: i32, total_pages: i32, current_page: i32, page_size: i32, has_more: bool) -> PaginationInfo {
PaginationInfo {
total_items,
total_pages,
current_page,
page_size,
has_more,
}
}
}