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.
36 lines
742 B
36 lines
742 B
1 month ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'page.g.dart';
|
||
|
|
||
|
@JsonSerializable(genericArgumentFactories: true, explicitToJson: true)
|
||
|
class PageInfo<T> {
|
||
|
|
||
|
int? pageNum;
|
||
|
dynamic current;
|
||
|
int? pageSize;
|
||
|
dynamic size;
|
||
|
dynamic pages;
|
||
|
bool? hasPreviousPage;
|
||
|
bool? hasNextPage;
|
||
|
String? total;
|
||
|
List<T>? list;
|
||
|
List<T>? records;
|
||
|
|
||
|
PageInfo({
|
||
|
this.pageNum,
|
||
|
this.current,
|
||
|
this.pageSize,
|
||
|
this.size,
|
||
|
this.pages,
|
||
|
this.hasPreviousPage,
|
||
|
this.hasNextPage,
|
||
|
this.total,
|
||
|
this.list,
|
||
|
this.records,
|
||
|
});
|
||
|
|
||
|
factory PageInfo.fromJson(Map<String, dynamic> json, fromJson) => _$PageInfoFromJson<T>(json, fromJson);
|
||
|
|
||
|
Map<String, dynamic> toJson(toJson) => _$PageInfoToJson(this, toJson);
|
||
|
}
|