namespace Extrudex.API.DTOs; /// /// Generic paginated response wrapper for list endpoints. /// Provides pagination metadata alongside the result items. /// /// The type of items in the page. public class PagedResponse { /// The items in the current page. public IReadOnlyList Items { get; set; } = []; /// Total number of items across all pages. public int TotalCount { get; set; } /// Current page number (1-based). public int PageNumber { get; set; } /// Number of items per page. public int PageSize { get; set; } /// Total number of pages. public int TotalPages => PageSize > 0 ? (int)Math.Ceiling(TotalCount / (double)PageSize) : 0; /// Whether there is a next page. public bool HasNextPage => PageNumber < TotalPages; /// Whether there is a previous page. public bool HasPreviousPage => PageNumber > 1; }