import * as v from "valibot";

export const paginationModel = v.object({
    cursor: v.optional(v.string()),
    limit: v.pipe(v.number(), v.integer(), v.maxValue(100)),
    asc: v.optional(v.boolean(), true),
    totalItemCount: v.optional(v.pipe(v.number(), v.integer()), 0),
    totalPages: v.pipe(v.number(), v.integer()),
    page: v.pipe(v.number(), v.integer()),
});

export type PaginationModel = v.InferOutput<typeof paginationModel>;
