mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 02:56:58 +08:00
refa: article (#757)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
20
lib/models/dynamics/opus_detail/resource.dart
Normal file
20
lib/models/dynamics/opus_detail/resource.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user