You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

4 years ago
class PageInfo {
PageInfo();
4 years ago
int pageNum;
4 years ago
dynamic current;
4 years ago
int pageSize;
4 years ago
dynamic size;
dynamic pages;
4 years ago
bool hasPreviousPage;
bool hasNextPage;
String total;
List<dynamic> list;
4 years ago
List<dynamic> records;
4 years ago
factory PageInfo.fromJson(Map<String, dynamic> json) =>
4 years ago
PageInfo()
..pageNum = json['pageNum'] as int
..current = json['current']
..pageSize = json['pageSize'] as int
..size = json['size']
..pages = json['pages']
..hasPreviousPage = json['hasPreviousPage'] as bool
..hasNextPage = json['hasNextPage'] as bool
..total = json['total'] as String
..list = json['list'] as List
..records = json['records'] as List;
4 years ago
4 years ago
Map<String, dynamic> toJson() => <String, dynamic>{
'pageNum': this.pageNum,
'current': this.current,
'pageSize': this.pageSize,
'size': this.size,
'pages': this.pages,
'hasPreviousPage': this.hasPreviousPage,
'hasNextPage': this.hasNextPage,
'total': this.total,
4 years ago
'list': this.list.map((e) => e.toString()).toList(),
'records': this.records.map((e) => e.toString()).toList(),
4 years ago
};
}