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.
44 lines
936 B
44 lines
936 B
import 'package:json_annotation/json_annotation.dart'; |
|
|
|
part 'page_list.g.dart'; |
|
|
|
@JsonSerializable(genericArgumentFactories: true, explicitToJson: true) |
|
class PageList<T> { |
|
|
|
List<T>? records = []; |
|
String? total = ''; |
|
String? size = ''; |
|
String? current = ''; |
|
List<Orders>? orders = []; |
|
bool? hitCount = false; |
|
bool? searchCount = false; |
|
String? pages = ''; |
|
|
|
PageList({ |
|
this.records, |
|
this.total, |
|
this.size, |
|
this.current, |
|
this.orders, |
|
this.hitCount, |
|
this.searchCount, |
|
this.pages, |
|
}); |
|
|
|
factory PageList.fromJson(Map<String, dynamic> json, fromJson) => _$PageListFromJson(json, fromJson); |
|
|
|
Map<String, dynamic> toJson(toJson) => _$PageListToJson(this, toJson); |
|
|
|
} |
|
|
|
@JsonSerializable(explicitToJson: true) |
|
class Orders { |
|
String? column = ''; |
|
bool? asc = false; |
|
|
|
Orders(); |
|
|
|
factory Orders.fromJson(Map<String, dynamic> json) => _$OrdersFromJson(json); |
|
|
|
Map<String, dynamic> toJson() => _$OrdersToJson(this); |
|
} |