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.
31 lines
652 B
31 lines
652 B
1 month ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
part 'base_list_data.g.dart';
|
||
|
|
||
|
@JsonSerializable(genericArgumentFactories: true, explicitToJson: true)
|
||
|
class BaseListData<T> {
|
||
|
|
||
|
BaseListData({
|
||
|
this.code,
|
||
|
this.data,
|
||
|
this.extra,
|
||
|
this.isSuccess,
|
||
|
this.msg,
|
||
|
this.path,
|
||
|
this.timestamp,
|
||
|
});
|
||
|
|
||
|
int? code;
|
||
|
List<T>? data;
|
||
|
dynamic extra;
|
||
|
bool? isError;
|
||
|
bool? isSuccess;
|
||
|
String? msg;
|
||
|
String? path;
|
||
|
String? timestamp;
|
||
|
|
||
|
factory BaseListData.fromJson(Map<String, dynamic> json, fromJson) => _$BaseListDataFromJson<T>(json, fromJson);
|
||
|
|
||
|
Map<String, dynamic> toJson(toJson) => _$BaseListDataToJson(this, toJson);
|
||
|
|
||
|
}
|