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
568 B
31 lines
568 B
|
|
import 'package:huixiang/generated/json/base_data.g.dart'; |
|
import 'package:json_annotation/json_annotation.dart'; |
|
|
|
@JsonSerializable() |
|
class BaseData<T> { |
|
|
|
BaseData({ |
|
this.code, |
|
this.data, |
|
this.extra, |
|
this.isSuccess, |
|
this.msg, |
|
this.path, |
|
this.timestamp, |
|
}); |
|
|
|
int? code; |
|
T? data; |
|
dynamic extra; |
|
bool? isError; |
|
bool? isSuccess; |
|
String? msg; |
|
String? path; |
|
String? timestamp; |
|
|
|
factory BaseData.fromJson(Map<String, dynamic> json) => $BaseDataFromJson<T>(json); |
|
|
|
Map<String, dynamic> toJson() => $BaseDataToJson(this); |
|
|
|
}
|
|
|