mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
21 lines
465 B
Dart
21 lines
465 B
Dart
import 'res_image.dart';
|
|
|
|
class Resource {
|
|
ResImage? resImage;
|
|
int? resType;
|
|
|
|
Resource({this.resImage, this.resType});
|
|
|
|
factory Resource.fromJson(Map<String, dynamic> json) => Resource(
|
|
resImage: json['res_image'] == null
|
|
? null
|
|
: ResImage.fromJson(json['res_image'] as Map<String, dynamic>),
|
|
resType: json['res_type'] as int?,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'res_image': resImage?.toJson(),
|
|
'res_type': resType,
|
|
};
|
|
}
|