liboxen 0.53.0

Oxen is a fast data version control system, built with machine learning training data in mind. Designed to handle terabytes of data with ease, using a workflow similar to git. Version both structured and unstructured data of any modality: text, images, video, audio, CSV, Parquet, JSONL, model checkpoints, and more. liboxen is the embeddable core library behind the oxen CLI and server, which power fine tuning and inference pipelines for multimodal LLMs, image models, and video models on Oxen.ai.
use crate::opts::PaginateOpts;
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

#[derive(Default, Deserialize, Serialize, Debug, Clone, ToSchema)]
pub struct Pagination {
    pub page_size: usize,
    pub page_number: usize,
    pub total_pages: usize,
    pub total_entries: usize,
}

// Add default values
impl Pagination {
    pub fn empty(paginate_opts: PaginateOpts) -> Self {
        Pagination {
            page_number: paginate_opts.page_num,
            page_size: paginate_opts.page_size,
            total_pages: 1,
            total_entries: 0,
        }
    }
}