/// 分页数据集合
class PagedDataCollection<T> {
  /// 总数
  final int totalCount;

  /// 当前页
  ///
  /// - 从 `1` 开始
  final int pageIndex;

  /// 页码
  final int pageSize;

  /// 数据集合
  final List<T> data;

  /// 是否有下一页
  bool get hasNextPage => totalCount > pageIndex * pageSize;

  PagedDataCollection({
    required this.totalCount,
    required this.pageIndex,
    required this.pageSize,
    required this.data,
  });
}
