import 'package:json_annotation/json_annotation.dart';

part 'page.g.dart';


@JsonSerializable(genericArgumentFactories: true)
class PageInfo<D> {
  PageInfo();

  int pageNum;
  dynamic current;
  int pageSize;
  dynamic size;
  dynamic pages;
  bool hasPreviousPage;
  bool hasNextPage;
  String total;
  List<D> list;
  List<D> records;

      factory PageInfo.fromJson(Map<String, dynamic> json, D Function(dynamic d) fromJsonD) => _$PageInfoFromJson(json, fromJsonD);

  Map<String, dynamic> toJson(Object Function(D value) toJsonD) => _$PageInfoToJson(this, toJsonD);
}