mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
@@ -1,38 +0,0 @@
|
||||
class BlackListDataModel {
|
||||
BlackListDataModel({
|
||||
this.list,
|
||||
this.total,
|
||||
});
|
||||
|
||||
List<BlackListItem>? list;
|
||||
int? total;
|
||||
|
||||
BlackListDataModel.fromJson(Map<String, dynamic> json) {
|
||||
list = (json['list'] as List?)
|
||||
?.map<BlackListItem>((e) => BlackListItem.fromJson(e))
|
||||
.toList() ??
|
||||
<BlackListItem>[];
|
||||
total = json['total'];
|
||||
}
|
||||
}
|
||||
|
||||
class BlackListItem {
|
||||
BlackListItem({
|
||||
this.face,
|
||||
this.mid,
|
||||
this.mtime,
|
||||
this.uname,
|
||||
});
|
||||
|
||||
String? face;
|
||||
int? mid;
|
||||
int? mtime;
|
||||
String? uname;
|
||||
|
||||
BlackListItem.fromJson(Map<String, dynamic> json) {
|
||||
face = json['face'];
|
||||
mid = json['mid'];
|
||||
mtime = json['mtime'];
|
||||
uname = json['uname'];
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/models/user/fav_folder.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
class FavDetailData {
|
||||
FavFolderItemData? info;
|
||||
List<FavDetailItemData>? list;
|
||||
List<FavDetailItemData>? get medias => list;
|
||||
bool? hasMore;
|
||||
|
||||
FavDetailData.fromJson(Map<String, dynamic> json) {
|
||||
info =
|
||||
json['info'] == null ? null : FavFolderItemData.fromJson(json['info']);
|
||||
list = (json['medias'] as List?)
|
||||
?.map<FavDetailItemData>((e) => FavDetailItemData.fromJson(e))
|
||||
.toList();
|
||||
hasMore = json['has_more'];
|
||||
}
|
||||
}
|
||||
|
||||
class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
|
||||
int? id;
|
||||
int? type;
|
||||
int? page;
|
||||
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/fav/list.md
|
||||
// | attr | num | 失效 | 0: 正常;9: up自己删除;1: 其他原因删除 |
|
||||
int? attr;
|
||||
Map? cntInfo;
|
||||
String? link;
|
||||
int? ctime;
|
||||
int? favTime;
|
||||
Ogv? ogv;
|
||||
String? epId;
|
||||
|
||||
FavDetailItemData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
aid = id;
|
||||
type = json['type'];
|
||||
title = json['title'];
|
||||
pic = json['cover'];
|
||||
desc = json['intro'];
|
||||
page = json['page'];
|
||||
duration = json['duration'];
|
||||
owner = Owner.fromJson(json['upper']);
|
||||
attr = json['attr'];
|
||||
cntInfo = json['cnt_info'];
|
||||
link = json['link'];
|
||||
ctime = json['ctime'];
|
||||
pubdate = json['pubtime'];
|
||||
favTime = json['fav_time'];
|
||||
bvid = json['bvid'];
|
||||
ogv = json['ogv'] == null ? null : Ogv.fromJson(json['ogv']);
|
||||
stat = PlayStat.fromJson(json['cnt_info']);
|
||||
cid = json['ugc']?['first_cid'];
|
||||
if (json['link'] != null && json['link'].contains('/bangumi')) {
|
||||
epId = resolveEpId(json['link']);
|
||||
}
|
||||
}
|
||||
|
||||
static final _digitRegExp = RegExp(r'ep(\d+)');
|
||||
String? resolveEpId(String url) => _digitRegExp.firstMatch(url)?.group(1);
|
||||
}
|
||||
|
||||
class Ogv {
|
||||
String? typeName;
|
||||
int? typeId;
|
||||
int? seasonId;
|
||||
|
||||
Ogv({
|
||||
this.typeName,
|
||||
this.typeId,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory Ogv.fromJson(Map<String, dynamic> json) => Ogv(
|
||||
typeName: json["type_name"],
|
||||
typeId: json["type_id"],
|
||||
seasonId: json["season_id"],
|
||||
);
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
class FavFolderData {
|
||||
FavFolderData({
|
||||
this.count,
|
||||
this.list,
|
||||
this.hasMore,
|
||||
});
|
||||
|
||||
int? count;
|
||||
List<FavFolderItemData>? list;
|
||||
bool? hasMore;
|
||||
|
||||
FavFolderData.fromJson(Map<String, dynamic> json) {
|
||||
count = json['count'];
|
||||
list = (json['list'] as List?)
|
||||
?.map<FavFolderItemData>((e) => FavFolderItemData.fromJson(e))
|
||||
.toList() ??
|
||||
[FavFolderItemData()];
|
||||
hasMore = json['has_more'];
|
||||
}
|
||||
}
|
||||
|
||||
class FavFolderItemData {
|
||||
FavFolderItemData({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.mediaCount,
|
||||
this.viewCount,
|
||||
this.vt,
|
||||
this.playSwitch,
|
||||
this.type,
|
||||
this.link,
|
||||
this.bvid,
|
||||
});
|
||||
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Upper? upper;
|
||||
int? coverType;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? mediaCount;
|
||||
int? viewCount;
|
||||
int? vt;
|
||||
int? playSwitch;
|
||||
int? type;
|
||||
String? link;
|
||||
String? bvid;
|
||||
|
||||
FavFolderItemData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
fid = json['fid'];
|
||||
mid = json['mid'];
|
||||
attr = json['attr'];
|
||||
title = json['title'];
|
||||
cover = json['cover'];
|
||||
upper = json['upper'] != null ? Upper.fromJson(json['upper']) : Upper();
|
||||
coverType = json['cover_type'];
|
||||
intro = json['intro'];
|
||||
ctime = json['ctime'];
|
||||
mtime = json['mtime'];
|
||||
state = json['state'];
|
||||
favState = json['fav_state'];
|
||||
mediaCount = json['media_count'];
|
||||
viewCount = json['view_count'];
|
||||
vt = json['vt'];
|
||||
playSwitch = json['play_switch'];
|
||||
type = json['type'];
|
||||
link = json['link'];
|
||||
bvid = json['bvid'];
|
||||
}
|
||||
}
|
||||
|
||||
class Upper {
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
});
|
||||
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
|
||||
Upper.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
name = json['name'];
|
||||
face = json['face'];
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:PiliPlus/models/user/fav_topic/topic_list.dart';
|
||||
|
||||
class FavTopicData {
|
||||
TopicList? topicList;
|
||||
|
||||
FavTopicData({this.topicList});
|
||||
|
||||
factory FavTopicData.fromJson(Map<String, dynamic> json) => FavTopicData(
|
||||
topicList: json['topic_list'] == null
|
||||
? null
|
||||
: TopicList.fromJson(json['topic_list'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'topic_list': topicList?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class PageInfo {
|
||||
int? curPageNum;
|
||||
int? total;
|
||||
|
||||
PageInfo({this.curPageNum, this.total});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
curPageNum: json['cur_page_num'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'cur_page_num': curPageNum,
|
||||
'total': total,
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
class FavTopicModel {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? jumpUrl;
|
||||
String? statDesc;
|
||||
bool? showInteractData;
|
||||
|
||||
FavTopicModel({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.jumpUrl,
|
||||
this.statDesc,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory FavTopicModel.fromJson(Map<String, dynamic> json) => FavTopicModel(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
statDesc: json['stat_desc'] as String?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'view': view,
|
||||
'discuss': discuss,
|
||||
'jump_url': jumpUrl,
|
||||
'stat_desc': statDesc,
|
||||
'show_interact_data': showInteractData,
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models/user/fav_topic/page_info.dart';
|
||||
import 'package:PiliPlus/models/user/fav_topic/topic_item.dart';
|
||||
|
||||
class TopicList {
|
||||
List<FavTopicModel>? topicItems;
|
||||
PageInfo? pageInfo;
|
||||
|
||||
TopicList({this.topicItems, this.pageInfo});
|
||||
|
||||
factory TopicList.fromJson(Map<String, dynamic> json) => TopicList(
|
||||
topicItems: (json['topic_items'] as List<dynamic>?)
|
||||
?.map((e) => FavTopicModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'topic_items': topicItems?.map((e) => e.toJson()).toList(),
|
||||
'page_info': pageInfo?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart'
|
||||
show MultiSelectData;
|
||||
|
||||
class HistoryData {
|
||||
HistoryData({
|
||||
this.cursor,
|
||||
this.tab,
|
||||
this.list,
|
||||
this.page,
|
||||
});
|
||||
|
||||
Cursor? cursor;
|
||||
List<HisTabItem>? tab;
|
||||
List<HisListItem>? list;
|
||||
Map? page;
|
||||
|
||||
HistoryData.fromJson(Map<String, dynamic> json) {
|
||||
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
|
||||
tab = (json['tab'] as List?)
|
||||
?.map<HisTabItem>((e) => HisTabItem.fromJson(e))
|
||||
.toList();
|
||||
list = (json['list'] as List?)
|
||||
?.map<HisListItem>((e) => HisListItem.fromJson(e))
|
||||
.toList();
|
||||
page = json['page'];
|
||||
}
|
||||
}
|
||||
|
||||
class Cursor {
|
||||
Cursor({
|
||||
this.max,
|
||||
this.viewAt,
|
||||
this.business,
|
||||
this.ps,
|
||||
});
|
||||
|
||||
int? max;
|
||||
int? viewAt;
|
||||
String? business;
|
||||
int? ps;
|
||||
|
||||
Cursor.fromJson(Map<String, dynamic> json) {
|
||||
max = json['max'];
|
||||
viewAt = json['view_at'];
|
||||
business = json['business'];
|
||||
ps = json['ps'];
|
||||
}
|
||||
}
|
||||
|
||||
class HisTabItem {
|
||||
HisTabItem({
|
||||
this.type,
|
||||
this.name,
|
||||
});
|
||||
|
||||
String? type;
|
||||
String? name;
|
||||
|
||||
HisTabItem.fromJson(Map<String, dynamic> json) {
|
||||
type = json['type'];
|
||||
name = json['name'];
|
||||
}
|
||||
}
|
||||
|
||||
class HisListItem with MultiSelectData {
|
||||
late String title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
String? pic;
|
||||
List? covers;
|
||||
String? uri;
|
||||
late History history;
|
||||
int? videos;
|
||||
String? authorName;
|
||||
String? authorFace;
|
||||
int? authorMid;
|
||||
int? viewAt;
|
||||
int? progress;
|
||||
String? badge;
|
||||
String? showTitle;
|
||||
int? duration;
|
||||
String? current;
|
||||
int? total;
|
||||
String? newDesc;
|
||||
int? isFinish;
|
||||
int? isFav;
|
||||
int? kid;
|
||||
String? tagName;
|
||||
int? liveStatus;
|
||||
|
||||
HisListItem.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
longTitle = json['long_title'];
|
||||
cover = json['cover'];
|
||||
pic = json['cover'] ?? '';
|
||||
covers = json['covers'];
|
||||
uri = json['uri'];
|
||||
history = History.fromJson(json['history']);
|
||||
videos = json['videos'];
|
||||
authorName = json['author_name'];
|
||||
authorFace = json['author_face'];
|
||||
authorMid = json['author_mid'];
|
||||
viewAt = json['view_at'];
|
||||
progress = json['progress'];
|
||||
badge = json['badge'];
|
||||
showTitle = json['show_title'] == '' ? null : json['show_title'];
|
||||
duration = json['duration'];
|
||||
current = json['current'];
|
||||
total = json['total'];
|
||||
newDesc = json['new_desc'];
|
||||
isFinish = json['is_finish'];
|
||||
isFav = json['is_fav'];
|
||||
kid = json['kid'];
|
||||
tagName = json['tag_name'];
|
||||
liveStatus = json['live_status'];
|
||||
}
|
||||
}
|
||||
|
||||
class History {
|
||||
History({
|
||||
this.oid,
|
||||
this.epid,
|
||||
this.bvid,
|
||||
this.page,
|
||||
this.cid,
|
||||
this.part,
|
||||
this.business,
|
||||
this.dt,
|
||||
});
|
||||
|
||||
int? oid;
|
||||
int? epid;
|
||||
String? bvid;
|
||||
int? page;
|
||||
int? cid;
|
||||
String? part;
|
||||
String? business;
|
||||
int? dt;
|
||||
|
||||
History.fromJson(Map<String, dynamic> json) {
|
||||
oid = json['oid'];
|
||||
epid = json['epid'];
|
||||
bvid = json['bvid'] == '' ? null : json['bvid'];
|
||||
page = json['page'];
|
||||
cid = json['cid'] == 0 ? null : json['cid'];
|
||||
part = json['part'];
|
||||
business = json['business'];
|
||||
dt = json['dt'];
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class UserInfoData {
|
||||
face = json['face'];
|
||||
levelInfo = json['level_info'] != null
|
||||
? LevelInfo.fromJson(json['level_info'])
|
||||
: LevelInfo();
|
||||
: null;
|
||||
mid = json['mid'];
|
||||
mobileVerified = json['mobile_verified'];
|
||||
money = json['money'] is int ? json['money'].toDouble() : json['money'];
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
class MyEmote {
|
||||
Setting? setting;
|
||||
List<Packages>? packages;
|
||||
|
||||
MyEmote({this.setting, this.packages});
|
||||
|
||||
MyEmote.fromJson(Map<String, dynamic> json) {
|
||||
setting =
|
||||
json['setting'] != null ? Setting.fromJson(json['setting']) : null;
|
||||
if (json['packages'] != null) {
|
||||
packages =
|
||||
(json['packages'] as List).map((e) => Packages.fromJson(e)).toList();
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (setting != null) {
|
||||
data['setting'] = setting!.toJson();
|
||||
}
|
||||
if (packages != null) {
|
||||
data['packages'] = packages!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Setting {
|
||||
int? recentLimit;
|
||||
int? attr;
|
||||
int? focusPkgId;
|
||||
String? schema;
|
||||
|
||||
Setting({this.recentLimit, this.attr, this.focusPkgId, this.schema});
|
||||
|
||||
Setting.fromJson(Map<String, dynamic> json) {
|
||||
recentLimit = json['recent_limit'];
|
||||
attr = json['attr'];
|
||||
focusPkgId = json['focus_pkg_id'];
|
||||
schema = json['schema'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['recent_limit'] = recentLimit;
|
||||
data['attr'] = attr;
|
||||
data['focus_pkg_id'] = focusPkgId;
|
||||
data['schema'] = schema;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Packages {
|
||||
int? id;
|
||||
String? text;
|
||||
String? url;
|
||||
int? mtime;
|
||||
int? type;
|
||||
int? attr;
|
||||
PackagesMeta? meta;
|
||||
List<Emote>? emote;
|
||||
PackagesFlags? flags;
|
||||
Label? label;
|
||||
String? packageSubTitle;
|
||||
int? refMid;
|
||||
|
||||
Packages(
|
||||
{this.id,
|
||||
this.text,
|
||||
this.url,
|
||||
this.mtime,
|
||||
this.type,
|
||||
this.attr,
|
||||
this.meta,
|
||||
this.emote,
|
||||
this.flags,
|
||||
this.label,
|
||||
this.packageSubTitle,
|
||||
this.refMid});
|
||||
|
||||
Packages.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
text = json['text'];
|
||||
url = json['url'];
|
||||
mtime = json['mtime'];
|
||||
type = json['type'];
|
||||
attr = json['attr'];
|
||||
meta = json['meta'] != null ? PackagesMeta.fromJson(json['meta']) : null;
|
||||
if (json['emote'] != null) {
|
||||
emote = (json['emote'] as List).map((e) => Emote.fromJson(e)).toList();
|
||||
}
|
||||
flags =
|
||||
json['flags'] != null ? PackagesFlags.fromJson(json['flags']) : null;
|
||||
label = json['label'] != null ? Label.fromJson(json['label']) : null;
|
||||
packageSubTitle = json['package_sub_title'];
|
||||
refMid = json['ref_mid'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['text'] = text;
|
||||
data['url'] = url;
|
||||
data['mtime'] = mtime;
|
||||
data['type'] = type;
|
||||
data['attr'] = attr;
|
||||
if (meta != null) {
|
||||
data['meta'] = meta!.toJson();
|
||||
}
|
||||
if (emote != null) {
|
||||
data['emote'] = emote!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (flags != null) {
|
||||
data['flags'] = flags!.toJson();
|
||||
}
|
||||
if (label != null) {
|
||||
data['label'] = label!.toJson();
|
||||
}
|
||||
data['package_sub_title'] = packageSubTitle;
|
||||
data['ref_mid'] = refMid;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Label {
|
||||
String? fontColor;
|
||||
String? backgroundColor;
|
||||
String? text;
|
||||
|
||||
Label({this.fontColor, this.backgroundColor, this.text});
|
||||
|
||||
Label.fromJson(Map<String, dynamic> json) {
|
||||
fontColor = json['font_color'];
|
||||
backgroundColor = json['background_color'];
|
||||
text = json['text'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['font_color'] = fontColor;
|
||||
data['background_color'] = backgroundColor;
|
||||
data['text'] = text;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class PackagesMeta {
|
||||
int? size;
|
||||
int? itemId;
|
||||
String? itemUrl;
|
||||
int? assetId;
|
||||
|
||||
PackagesMeta({this.size, this.itemId, this.itemUrl, this.assetId});
|
||||
|
||||
PackagesMeta.fromJson(Map<String, dynamic> json) {
|
||||
size = json['size'];
|
||||
itemId = json['item_id'];
|
||||
itemUrl = json['item_url'];
|
||||
assetId = json['asset_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['size'] = size;
|
||||
data['item_id'] = itemId;
|
||||
data['item_url'] = itemUrl;
|
||||
data['asset_id'] = assetId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Emote {
|
||||
int? id;
|
||||
int? packageId;
|
||||
String? text;
|
||||
String? url;
|
||||
int? mtime;
|
||||
int? type;
|
||||
int? attr;
|
||||
EmoteMeta? meta;
|
||||
EmoteFlags? flags;
|
||||
dynamic activity;
|
||||
String? gifUrl;
|
||||
|
||||
Emote(
|
||||
{this.id,
|
||||
this.packageId,
|
||||
this.text,
|
||||
this.url,
|
||||
this.mtime,
|
||||
this.type,
|
||||
this.attr,
|
||||
this.meta,
|
||||
this.flags,
|
||||
this.activity,
|
||||
this.gifUrl});
|
||||
|
||||
Emote.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
packageId = json['package_id'];
|
||||
text = json['text'];
|
||||
url = json['url'];
|
||||
mtime = json['mtime'];
|
||||
type = json['type'];
|
||||
attr = json['attr'];
|
||||
meta = json['meta'] != null ? EmoteMeta.fromJson(json['meta']) : null;
|
||||
flags = json['flags'] != null ? EmoteFlags.fromJson(json['flags']) : null;
|
||||
activity = json['activity'];
|
||||
gifUrl = json['gif_url'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['package_id'] = packageId;
|
||||
data['text'] = text;
|
||||
data['url'] = url;
|
||||
data['mtime'] = mtime;
|
||||
data['type'] = type;
|
||||
data['attr'] = attr;
|
||||
if (meta != null) {
|
||||
data['meta'] = meta!.toJson();
|
||||
}
|
||||
if (flags != null) {
|
||||
data['flags'] = flags!.toJson();
|
||||
}
|
||||
data['activity'] = activity;
|
||||
data['gif_url'] = gifUrl;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class EmoteMeta {
|
||||
int? size;
|
||||
List? suggest;
|
||||
String? alias;
|
||||
String? gifUrl;
|
||||
|
||||
EmoteMeta({this.size, this.suggest, this.alias, this.gifUrl});
|
||||
|
||||
EmoteMeta.fromJson(Map<String, dynamic> json) {
|
||||
size = json['size'];
|
||||
suggest = json['suggest'];
|
||||
alias = json['alias'];
|
||||
gifUrl = json['gif_url'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['size'] = size;
|
||||
data['suggest'] = suggest;
|
||||
data['alias'] = alias;
|
||||
data['gif_url'] = gifUrl;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class EmoteFlags {
|
||||
bool? unlocked;
|
||||
bool? recentUseForbid;
|
||||
|
||||
EmoteFlags({this.unlocked, this.recentUseForbid});
|
||||
EmoteFlags.fromJson(Map<String, dynamic> json) {
|
||||
unlocked = json['unlocked'];
|
||||
recentUseForbid = json['recent_use_forbid'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['unlocked'] = unlocked;
|
||||
data['recent_use_forbid'] = recentUseForbid;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class PackagesFlags {
|
||||
bool? added;
|
||||
bool? preview;
|
||||
|
||||
PackagesFlags({this.added, this.preview});
|
||||
|
||||
PackagesFlags.fromJson(Map<String, dynamic> json) {
|
||||
added = json['added'];
|
||||
preview = json['preview'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['added'] = added;
|
||||
data['preview'] = preview;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
class SubDetailModelData {
|
||||
DetailInfo? info;
|
||||
List<SubDetailMediaItem>? list;
|
||||
|
||||
List<SubDetailMediaItem>? get medias => list; // 不知道哪里使用了这个
|
||||
|
||||
SubDetailModelData({this.info, this.list});
|
||||
|
||||
SubDetailModelData.fromJson(Map<String, dynamic> json) {
|
||||
info = DetailInfo.fromJson(json['info']);
|
||||
list = (json['medias'] as List?)
|
||||
?.map((i) => SubDetailMediaItem.fromJson(i))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class SubDetailMediaItem {
|
||||
int? id;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? pic;
|
||||
int? duration;
|
||||
int? pubtime;
|
||||
String? bvid;
|
||||
Map<String, dynamic>? upper;
|
||||
Map<String, dynamic>? cntInfo;
|
||||
int? enableVt;
|
||||
String? vtDisplay;
|
||||
|
||||
SubDetailMediaItem({
|
||||
this.id,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.pic,
|
||||
this.duration,
|
||||
this.pubtime,
|
||||
this.bvid,
|
||||
this.upper,
|
||||
this.cntInfo,
|
||||
this.enableVt,
|
||||
this.vtDisplay,
|
||||
});
|
||||
|
||||
SubDetailMediaItem.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
title = json['title'];
|
||||
cover = json['cover'];
|
||||
pic = json['cover'];
|
||||
duration = json['duration'];
|
||||
pubtime = json['pubtime'];
|
||||
bvid = json['bvid'];
|
||||
upper = json['upper'];
|
||||
cntInfo = json['cnt_info'];
|
||||
enableVt = json['enable_vt'];
|
||||
vtDisplay = json['vt_display'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['title'] = title;
|
||||
data['cover'] = cover;
|
||||
data['duration'] = duration;
|
||||
data['pubtime'] = pubtime;
|
||||
data['bvid'] = bvid;
|
||||
data['upper'] = upper;
|
||||
data['cnt_info'] = cntInfo;
|
||||
data['enable_vt'] = enableVt;
|
||||
data['vt_display'] = vtDisplay;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DetailInfo {
|
||||
int? id;
|
||||
int? seasonType;
|
||||
String? title;
|
||||
String? cover;
|
||||
Map? upper;
|
||||
Map? cntInfo;
|
||||
int? mediaCount;
|
||||
String? intro;
|
||||
int? enableVt;
|
||||
|
||||
DetailInfo({
|
||||
this.id,
|
||||
this.seasonType,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.cntInfo,
|
||||
this.mediaCount,
|
||||
this.intro,
|
||||
this.enableVt,
|
||||
});
|
||||
|
||||
DetailInfo.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
seasonType = json['season_type'];
|
||||
title = json['title'];
|
||||
cover = json['cover'];
|
||||
upper = json['upper'];
|
||||
cntInfo = json['cnt_info'];
|
||||
mediaCount = json['media_count'];
|
||||
intro = json['intro'];
|
||||
enableVt = json['enable_vt'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['season_type'] = seasonType;
|
||||
data['title'] = title;
|
||||
data['cover'] = cover;
|
||||
data['upper'] = upper;
|
||||
data['cnt_info'] = cntInfo;
|
||||
data['media_count'] = mediaCount;
|
||||
data['intro'] = intro;
|
||||
data['enable_vt'] = enableVt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
class SubFolderModelData {
|
||||
final int? count;
|
||||
final List<SubFolderItemData>? list;
|
||||
|
||||
SubFolderModelData({
|
||||
this.count,
|
||||
this.list,
|
||||
});
|
||||
|
||||
factory SubFolderModelData.fromJson(Map<String, dynamic> json) {
|
||||
return SubFolderModelData(
|
||||
count: json['count'],
|
||||
list: (json['list'] as List?)
|
||||
?.map<SubFolderItemData>((i) => SubFolderItemData.fromJson(i))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SubFolderItemData {
|
||||
final int? id;
|
||||
final int? fid;
|
||||
final int? mid;
|
||||
final int? attr;
|
||||
final String? title;
|
||||
final String? cover;
|
||||
final Upper? upper;
|
||||
final int? coverType;
|
||||
final String? intro;
|
||||
final int? ctime;
|
||||
final int? mtime;
|
||||
final int? state;
|
||||
final int? favState;
|
||||
final int? mediaCount;
|
||||
final int? viewCount;
|
||||
final int? vt;
|
||||
final int? playSwitch;
|
||||
final int? type;
|
||||
final String? link;
|
||||
final String? bvid;
|
||||
|
||||
SubFolderItemData({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.mediaCount,
|
||||
this.viewCount,
|
||||
this.vt,
|
||||
this.playSwitch,
|
||||
this.type,
|
||||
this.link,
|
||||
this.bvid,
|
||||
});
|
||||
|
||||
factory SubFolderItemData.fromJson(Map<String, dynamic> json) {
|
||||
return SubFolderItemData(
|
||||
id: json['id'],
|
||||
fid: json['fid'],
|
||||
mid: json['mid'],
|
||||
attr: json['attr'],
|
||||
title: json['title'],
|
||||
cover: json['cover'],
|
||||
upper: json['upper'] != null ? Upper.fromJson(json['upper']) : null,
|
||||
coverType: json['cover_type'],
|
||||
intro: json['intro'],
|
||||
ctime: json['ctime'],
|
||||
mtime: json['mtime'],
|
||||
state: json['state'],
|
||||
favState: json['fav_state'],
|
||||
mediaCount: json['media_count'],
|
||||
viewCount: json['view_count'],
|
||||
vt: json['vt'],
|
||||
playSwitch: json['play_switch'],
|
||||
type: json['type'],
|
||||
link: json['link'],
|
||||
bvid: json['bvid'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Upper {
|
||||
final int? mid;
|
||||
final String? name;
|
||||
final String? face;
|
||||
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) {
|
||||
return Upper(
|
||||
mid: json['mid'],
|
||||
name: json['name'],
|
||||
face: json['face'],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user