feat: popular series/precious

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-19 18:09:10 +08:00
parent 51c605f5d0
commit d62d0eddc2
13 changed files with 585 additions and 16 deletions

View 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(),
);
}

View 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?,
);
}

View 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?,
);
}

View 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(),
);
}