mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
refa: query data (#659)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
class BangumiListDataModel {
|
||||
BangumiListDataModel({
|
||||
this.hasNext,
|
||||
@@ -24,7 +27,7 @@ class BangumiListDataModel {
|
||||
}
|
||||
}
|
||||
|
||||
class BangumiListItemModel {
|
||||
class BangumiListItemModel with MultiSelectData {
|
||||
BangumiListItemModel({
|
||||
this.badge,
|
||||
this.badgeType,
|
||||
@@ -66,8 +69,6 @@ class BangumiListItemModel {
|
||||
Map? newEp;
|
||||
String? progress;
|
||||
|
||||
bool? checked;
|
||||
|
||||
BangumiListItemModel.fromJson(Map<String, dynamic> json) {
|
||||
badge = json['badge'] == '' ? null : json['badge'];
|
||||
badgeType = json['badge_type'];
|
||||
|
||||
@@ -22,9 +22,8 @@ class LiveFollowingModel {
|
||||
LiveFollowingModel.fromJson(Map<String, dynamic> json) {
|
||||
count = json['count'];
|
||||
list = (json['list'] as List?)
|
||||
?.map((item) => LiveFollowingItemModel.fromJson(item))
|
||||
.toList() ??
|
||||
<LiveFollowingItemModel>[];
|
||||
?.map((item) => LiveFollowingItemModel.fromJson(item))
|
||||
.toList();
|
||||
liveCount = json['live_count'];
|
||||
neverLivedCount = json['never_lived_count'];
|
||||
neverLivedFaces = json['never_lived_faces'];
|
||||
|
||||
31
lib/models/member/article.dart
Normal file
31
lib/models/member/article.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class FavArticleModel with MultiSelectData {
|
||||
FavArticleModel({
|
||||
this.webUrl,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.message,
|
||||
this.pic,
|
||||
this.cvid,
|
||||
this.noteId,
|
||||
});
|
||||
|
||||
String? webUrl;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? message;
|
||||
String? pic;
|
||||
dynamic cvid;
|
||||
dynamic noteId;
|
||||
|
||||
FavArticleModel.fromJson(Map json) {
|
||||
webUrl = json['web_url'];
|
||||
title = json['title'];
|
||||
summary = json['summary'];
|
||||
message = json['message'];
|
||||
pic = json['arc']?['pic'];
|
||||
cvid = json['cvid'];
|
||||
noteId = json['note_id'];
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
class MemberTagItemModel {
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
class MemberTagItemModel with MultiSelectData {
|
||||
MemberTagItemModel({
|
||||
this.count,
|
||||
this.name,
|
||||
this.tagid,
|
||||
this.tip,
|
||||
this.checked,
|
||||
});
|
||||
|
||||
int? count;
|
||||
String? name;
|
||||
int? tagid;
|
||||
String? tip;
|
||||
bool? checked;
|
||||
|
||||
MemberTagItemModel.fromJson(Map<String, dynamic> json) {
|
||||
count = json['count'];
|
||||
name = json['name'];
|
||||
tagid = json['tagid'];
|
||||
tip = json['tip'];
|
||||
checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
import 'model_owner.dart';
|
||||
import 'model_rec_video_item.dart';
|
||||
import 'model_video.dart';
|
||||
|
||||
// 稍后再看, 排行榜等网页返回也使用该类
|
||||
class HotVideoItemModel extends BaseRecVideoItemModel {
|
||||
class HotVideoItemModel extends BaseRecVideoItemModel with MultiSelectData {
|
||||
int? videos;
|
||||
int? tid;
|
||||
String? tname;
|
||||
@@ -16,8 +18,6 @@ class HotVideoItemModel extends BaseRecVideoItemModel {
|
||||
String? pgcLabel;
|
||||
String? redirectUrl;
|
||||
|
||||
bool? checked; // 手动设置的
|
||||
|
||||
num? progress;
|
||||
|
||||
HotVideoItemModel.fromJson(Map<String, dynamic> json) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
import '../model_owner.dart';
|
||||
import '../model_video.dart';
|
||||
import 'fav_folder.dart';
|
||||
@@ -18,7 +21,7 @@ class FavDetailData {
|
||||
}
|
||||
}
|
||||
|
||||
class FavDetailItemData extends BaseVideoItemModel {
|
||||
class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
|
||||
int? id;
|
||||
int? type;
|
||||
int? page;
|
||||
@@ -31,7 +34,6 @@ class FavDetailItemData extends BaseVideoItemModel {
|
||||
int? favTime;
|
||||
Map? ogv;
|
||||
String? epId;
|
||||
bool? checked;
|
||||
|
||||
FavDetailItemData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
class HistoryData {
|
||||
HistoryData({
|
||||
this.cursor,
|
||||
@@ -59,7 +62,7 @@ class HisTabItem {
|
||||
}
|
||||
}
|
||||
|
||||
class HisListItem {
|
||||
class HisListItem with MultiSelectData {
|
||||
late String title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
@@ -84,7 +87,6 @@ class HisListItem {
|
||||
int? kid;
|
||||
String? tagName;
|
||||
int? liveStatus;
|
||||
bool? checked;
|
||||
dynamic isFullScreen;
|
||||
|
||||
HisListItem.fromJson(Map<String, dynamic> json) {
|
||||
|
||||
Reference in New Issue
Block a user