mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 04:58:41 +00:00
feat: popular series/precious
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
20
lib/models_new/popular/popular_precious/data.dart
Normal file
20
lib/models_new/popular/popular_precious/data.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:PiliPlus/models/model_hot_video_item.dart';
|
||||
|
||||
class PopularPreciousData {
|
||||
String? title;
|
||||
int? mediaId;
|
||||
String? explain;
|
||||
List<HotVideoItemModel>? list;
|
||||
|
||||
PopularPreciousData({this.title, this.mediaId, this.explain, this.list});
|
||||
|
||||
factory PopularPreciousData.fromJson(Map<String, dynamic> json) =>
|
||||
PopularPreciousData(
|
||||
title: json['title'] as String?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
explain: json['explain'] as String?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => HotVideoItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
16
lib/models_new/popular/popular_series_list/list.dart
Normal file
16
lib/models_new/popular/popular_series_list/list.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
class PopularSeriesListItem {
|
||||
int? number;
|
||||
String? subject;
|
||||
int? status;
|
||||
String? name;
|
||||
|
||||
PopularSeriesListItem({this.number, this.subject, this.status, this.name});
|
||||
|
||||
factory PopularSeriesListItem.fromJson(Map<String, dynamic> json) =>
|
||||
PopularSeriesListItem(
|
||||
number: json['number'] as int?,
|
||||
subject: json['subject'] as String?,
|
||||
status: json['status'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
54
lib/models_new/popular/popular_series_one/config.dart
Normal file
54
lib/models_new/popular/popular_series_one/config.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
class PopularSeriesConfig {
|
||||
int? id;
|
||||
String? type;
|
||||
int? number;
|
||||
String? subject;
|
||||
int? stime;
|
||||
int? etime;
|
||||
int? status;
|
||||
String? name;
|
||||
String? label;
|
||||
String? hint;
|
||||
int? color;
|
||||
String? cover;
|
||||
String? shareTitle;
|
||||
String? shareSubtitle;
|
||||
int? mediaId;
|
||||
|
||||
PopularSeriesConfig({
|
||||
this.id,
|
||||
this.type,
|
||||
this.number,
|
||||
this.subject,
|
||||
this.stime,
|
||||
this.etime,
|
||||
this.status,
|
||||
this.name,
|
||||
this.label,
|
||||
this.hint,
|
||||
this.color,
|
||||
this.cover,
|
||||
this.shareTitle,
|
||||
this.shareSubtitle,
|
||||
this.mediaId,
|
||||
});
|
||||
|
||||
factory PopularSeriesConfig.fromJson(Map<String, dynamic> json) =>
|
||||
PopularSeriesConfig(
|
||||
id: json['id'] as int?,
|
||||
type: json['type'] as String?,
|
||||
number: json['number'] as int?,
|
||||
subject: json['subject'] as String?,
|
||||
stime: json['stime'] as int?,
|
||||
etime: json['etime'] as int?,
|
||||
status: json['status'] as int?,
|
||||
name: json['name'] as String?,
|
||||
label: json['label'] as String?,
|
||||
hint: json['hint'] as String?,
|
||||
color: json['color'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
shareTitle: json['share_title'] as String?,
|
||||
shareSubtitle: json['share_subtitle'] as String?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/popular/popular_series_one/data.dart
Normal file
23
lib/models_new/popular/popular_series_one/data.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:PiliPlus/models/model_hot_video_item.dart';
|
||||
import 'package:PiliPlus/models_new/popular/popular_series_one/config.dart';
|
||||
|
||||
class PopularSeriesOneData {
|
||||
PopularSeriesConfig? config;
|
||||
String? reminder;
|
||||
List<HotVideoItemModel>? list;
|
||||
|
||||
PopularSeriesOneData({this.config, this.reminder, this.list});
|
||||
|
||||
factory PopularSeriesOneData.fromJson(Map<String, dynamic> json) =>
|
||||
PopularSeriesOneData(
|
||||
config: json['config'] == null
|
||||
? null
|
||||
: PopularSeriesConfig.fromJson(
|
||||
json['config'] as Map<String, dynamic>,
|
||||
),
|
||||
reminder: json['reminder'] as String?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => HotVideoItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user