mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
24 lines
634 B
Dart
24 lines
634 B
Dart
import 'pgc_rank_item_model.dart';
|
|
|
|
class Data {
|
|
List<PgcRankItemModel>? list;
|
|
String? note;
|
|
int? seasonType;
|
|
|
|
Data({this.list, this.note, this.seasonType});
|
|
|
|
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
|
list: (json['list'] as List<dynamic>?)
|
|
?.map((e) => PgcRankItemModel.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
note: json['note'] as String?,
|
|
seasonType: json['season_type'] as int?,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'list': list?.map((e) => e.toJson()).toList(),
|
|
'note': note,
|
|
'season_type': seasonType,
|
|
};
|
|
}
|