mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-27 12:36:27 +08:00
66
lib/models_new/account_myinfo/data.dart
Normal file
66
lib/models_new/account_myinfo/data.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
class AccountMyInfoData {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? sign;
|
||||
int? coins;
|
||||
String? birthday;
|
||||
String? face;
|
||||
int? faceNftNew;
|
||||
int? sex;
|
||||
int? level;
|
||||
int? rank;
|
||||
int? silence;
|
||||
int? emailStatus;
|
||||
int? telStatus;
|
||||
int? identification;
|
||||
int? isTourist;
|
||||
int? pinPrompting;
|
||||
int? inRegAudit;
|
||||
bool? hasFaceNft;
|
||||
bool? setBirthday;
|
||||
|
||||
AccountMyInfoData({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.sign,
|
||||
this.coins,
|
||||
this.birthday,
|
||||
this.face,
|
||||
this.faceNftNew,
|
||||
this.sex,
|
||||
this.level,
|
||||
this.rank,
|
||||
this.silence,
|
||||
this.emailStatus,
|
||||
this.telStatus,
|
||||
this.identification,
|
||||
this.isTourist,
|
||||
this.pinPrompting,
|
||||
this.inRegAudit,
|
||||
this.hasFaceNft,
|
||||
this.setBirthday,
|
||||
});
|
||||
|
||||
factory AccountMyInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
AccountMyInfoData(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
coins: json['coins'] as int?,
|
||||
birthday: json['birthday'] as String?,
|
||||
face: json['face'] as String?,
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
sex: json['sex'] as int?,
|
||||
level: json['level'] as int?,
|
||||
rank: json['rank'] as int?,
|
||||
silence: json['silence'] as int?,
|
||||
emailStatus: json['email_status'] as int?,
|
||||
telStatus: json['tel_status'] as int?,
|
||||
identification: json['identification'] as int?,
|
||||
isTourist: json['is_tourist'] as int?,
|
||||
pinPrompting: json['pin_prompting'] as int?,
|
||||
inRegAudit: json['in_reg_audit'] as int?,
|
||||
hasFaceNft: json['has_face_nft'] as bool?,
|
||||
setBirthday: json['set_birthday'] as bool?,
|
||||
);
|
||||
}
|
||||
85
lib/models_new/article/article_info/data.dart
Normal file
85
lib/models_new/article/article_info/data.dart
Normal file
@@ -0,0 +1,85 @@
|
||||
import 'package:PiliPlus/models_new/article/article_info/share_channel.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_info/stats.dart';
|
||||
|
||||
class ArticleInfoData {
|
||||
int? like;
|
||||
bool? attention;
|
||||
bool? favorite;
|
||||
int? coin;
|
||||
Stats? stats;
|
||||
String? title;
|
||||
String? bannerUrl;
|
||||
int? mid;
|
||||
String? authorName;
|
||||
bool? isAuthor;
|
||||
List<String>? imageUrls;
|
||||
List<String>? originImageUrls;
|
||||
bool? shareable;
|
||||
bool? showLaterWatch;
|
||||
bool? showSmallWindow;
|
||||
bool? inList;
|
||||
int? pre;
|
||||
int? next;
|
||||
List<ShareChannel>? shareChannels;
|
||||
int? type;
|
||||
String? videoUrl;
|
||||
String? location;
|
||||
bool? disableShare;
|
||||
|
||||
ArticleInfoData({
|
||||
this.like,
|
||||
this.attention,
|
||||
this.favorite,
|
||||
this.coin,
|
||||
this.stats,
|
||||
this.title,
|
||||
this.bannerUrl,
|
||||
this.mid,
|
||||
this.authorName,
|
||||
this.isAuthor,
|
||||
this.imageUrls,
|
||||
this.originImageUrls,
|
||||
this.shareable,
|
||||
this.showLaterWatch,
|
||||
this.showSmallWindow,
|
||||
this.inList,
|
||||
this.pre,
|
||||
this.next,
|
||||
this.shareChannels,
|
||||
this.type,
|
||||
this.videoUrl,
|
||||
this.location,
|
||||
this.disableShare,
|
||||
});
|
||||
|
||||
factory ArticleInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleInfoData(
|
||||
like: json['like'] as int?,
|
||||
attention: json['attention'] as bool?,
|
||||
favorite: json['favorite'] as bool?,
|
||||
coin: json['coin'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
mid: json['mid'] as int?,
|
||||
authorName: json['author_name'] as String?,
|
||||
isAuthor: json['is_author'] as bool?,
|
||||
imageUrls: (json['image_urls'] as List?)?.cast(),
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.cast(),
|
||||
shareable: json['shareable'] as bool?,
|
||||
showLaterWatch: json['show_later_watch'] as bool?,
|
||||
showSmallWindow: json['show_small_window'] as bool?,
|
||||
inList: json['in_list'] as bool?,
|
||||
pre: json['pre'] as int?,
|
||||
next: json['next'] as int?,
|
||||
shareChannels: (json['share_channels'] as List<dynamic>?)
|
||||
?.map((e) => ShareChannel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
type: json['type'] as int?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
location: json['location'] as String?,
|
||||
disableShare: json['disable_share'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/article/article_info/share_channel.dart
Normal file
13
lib/models_new/article/article_info/share_channel.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class ShareChannel {
|
||||
String? name;
|
||||
String? picture;
|
||||
String? shareChannel;
|
||||
|
||||
ShareChannel({this.name, this.picture, this.shareChannel});
|
||||
|
||||
factory ShareChannel.fromJson(Map<String, dynamic> json) => ShareChannel(
|
||||
name: json['name'] as String?,
|
||||
picture: json['picture'] as String?,
|
||||
shareChannel: json['share_channel'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/article/article_info/stats.dart
Normal file
32
lib/models_new/article/article_info/stats.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
66
lib/models_new/article/article_list/article.dart
Normal file
66
lib/models_new/article/article_list/article.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:PiliPlus/models_new/article/article_list/category.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/stats.dart';
|
||||
|
||||
class ArticleListItemModel {
|
||||
int? id;
|
||||
String? title;
|
||||
int? state;
|
||||
int? publishTime;
|
||||
int? words;
|
||||
List<String>? imageUrls;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? summary;
|
||||
int? type;
|
||||
String? dynIdStr;
|
||||
int? attributes;
|
||||
int? authorUid;
|
||||
int? onlyFans;
|
||||
Stats? stats;
|
||||
int? likeState;
|
||||
|
||||
ArticleListItemModel({
|
||||
this.id,
|
||||
this.title,
|
||||
this.state,
|
||||
this.publishTime,
|
||||
this.words,
|
||||
this.imageUrls,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.summary,
|
||||
this.type,
|
||||
this.dynIdStr,
|
||||
this.attributes,
|
||||
this.authorUid,
|
||||
this.onlyFans,
|
||||
this.stats,
|
||||
this.likeState,
|
||||
});
|
||||
|
||||
factory ArticleListItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListItemModel(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
state: json['state'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
words: json['words'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.cast(),
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
summary: json['summary'] as String?,
|
||||
type: json['type'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
attributes: json['attributes'] as int?,
|
||||
authorUid: json['author_uid'] as int?,
|
||||
onlyFans: json['only_fans'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
likeState: json['like_state'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/article/article_list/category.dart
Normal file
13
lib/models_new/article/article_list/category.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
33
lib/models_new/article/article_list/data.dart
Normal file
33
lib/models_new/article/article_list/data.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/article.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/last.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/list.dart';
|
||||
|
||||
class ArticleListData {
|
||||
ArticleListInfo? list;
|
||||
List<ArticleListItemModel>? articles;
|
||||
Owner? author;
|
||||
Last? last;
|
||||
bool? attention;
|
||||
|
||||
ArticleListData(
|
||||
{this.list, this.articles, this.author, this.last, this.attention});
|
||||
|
||||
factory ArticleListData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListData(
|
||||
list: json['list'] == null
|
||||
? null
|
||||
: ArticleListInfo.fromJson(json['list'] as Map<String, dynamic>),
|
||||
articles: (json['articles'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => ArticleListItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['author'] as Map<String, dynamic>),
|
||||
last: json['last'] == null
|
||||
? null
|
||||
: Last.fromJson(json['last'] as Map<String, dynamic>),
|
||||
attention: json['attention'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/article/article_list/label.dart
Normal file
13
lib/models_new/article/article_list/label.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
|
||||
Label({this.path, this.text, this.labelTheme});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
);
|
||||
}
|
||||
54
lib/models_new/article/article_list/last.dart
Normal file
54
lib/models_new/article/article_list/last.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
import 'package:PiliPlus/models_new/article/article_list/category.dart';
|
||||
|
||||
class Last {
|
||||
int? id;
|
||||
String? title;
|
||||
int? state;
|
||||
int? publishTime;
|
||||
int? words;
|
||||
List<String>? imageUrls;
|
||||
Category? category;
|
||||
dynamic categories;
|
||||
String? summary;
|
||||
int? type;
|
||||
String? dynIdStr;
|
||||
int? attributes;
|
||||
int? authorUid;
|
||||
int? onlyFans;
|
||||
|
||||
Last({
|
||||
this.id,
|
||||
this.title,
|
||||
this.state,
|
||||
this.publishTime,
|
||||
this.words,
|
||||
this.imageUrls,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.summary,
|
||||
this.type,
|
||||
this.dynIdStr,
|
||||
this.attributes,
|
||||
this.authorUid,
|
||||
this.onlyFans,
|
||||
});
|
||||
|
||||
factory Last.fromJson(Map<String, dynamic> json) => Last(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
state: json['state'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
words: json['words'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.cast(),
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: json['categories'] as dynamic,
|
||||
summary: json['summary'] as String?,
|
||||
type: json['type'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
attributes: json['attributes'] as int?,
|
||||
authorUid: json['author_uid'] as int?,
|
||||
onlyFans: json['only_fans'] as int?,
|
||||
);
|
||||
}
|
||||
54
lib/models_new/article/article_list/list.dart
Normal file
54
lib/models_new/article/article_list/list.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
class ArticleListInfo {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? name;
|
||||
String? imageUrl;
|
||||
int? updateTime;
|
||||
int? ctime;
|
||||
int? publishTime;
|
||||
String? summary;
|
||||
int? words;
|
||||
int? read;
|
||||
int? articlesCount;
|
||||
int? state;
|
||||
String? reason;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
|
||||
ArticleListInfo({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.imageUrl,
|
||||
this.updateTime,
|
||||
this.ctime,
|
||||
this.publishTime,
|
||||
this.summary,
|
||||
this.words,
|
||||
this.read,
|
||||
this.articlesCount,
|
||||
this.state,
|
||||
this.reason,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
});
|
||||
|
||||
factory ArticleListInfo.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListInfo(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
updateTime: json['update_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
summary: json['summary'] as String?,
|
||||
words: json['words'] as int?,
|
||||
read: json['read'] as int?,
|
||||
articlesCount: json['articles_count'] as int?,
|
||||
state: json['state'] as int?,
|
||||
reason: json['reason'] as String?,
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/article/article_list/stats.dart
Normal file
32
lib/models_new/article/article_list/stats.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/article/article_view/category.dart
Normal file
13
lib/models_new/article/article_view/category.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
155
lib/models_new/article/article_view/data.dart
Normal file
155
lib/models_new/article/article_view/data.dart
Normal file
@@ -0,0 +1,155 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/category.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/media.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/ops.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/opus.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/stats.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/tag.dart';
|
||||
|
||||
class ArticleViewData {
|
||||
int? id;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? bannerUrl;
|
||||
int? templateId;
|
||||
int? state;
|
||||
Avatar? author;
|
||||
int? reprint;
|
||||
List<String>? imageUrls;
|
||||
int? publishTime;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
Stats? stats;
|
||||
List<Tag>? tags;
|
||||
int? words;
|
||||
List<String>? originImageUrls;
|
||||
dynamic list;
|
||||
bool? isLike;
|
||||
Media? media;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
int? original;
|
||||
int? actId;
|
||||
dynamic dispute;
|
||||
dynamic authenMark;
|
||||
int? coverAvid;
|
||||
dynamic topVideoInfo;
|
||||
int? type;
|
||||
int? checkState;
|
||||
int? originTemplateId;
|
||||
int? privatePub;
|
||||
dynamic contentPicList;
|
||||
String? content;
|
||||
String? keywords;
|
||||
int? versionId;
|
||||
String? dynIdStr;
|
||||
int? totalArtNum;
|
||||
ArticleOpus? opus;
|
||||
List<ArticleOps>? ops;
|
||||
|
||||
ArticleViewData({
|
||||
this.id,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.bannerUrl,
|
||||
this.templateId,
|
||||
this.state,
|
||||
this.author,
|
||||
this.reprint,
|
||||
this.imageUrls,
|
||||
this.publishTime,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.stats,
|
||||
this.tags,
|
||||
this.words,
|
||||
this.originImageUrls,
|
||||
this.list,
|
||||
this.isLike,
|
||||
this.media,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
this.original,
|
||||
this.actId,
|
||||
this.dispute,
|
||||
this.authenMark,
|
||||
this.coverAvid,
|
||||
this.topVideoInfo,
|
||||
this.type,
|
||||
this.checkState,
|
||||
this.originTemplateId,
|
||||
this.privatePub,
|
||||
this.contentPicList,
|
||||
this.content,
|
||||
this.keywords,
|
||||
this.versionId,
|
||||
this.dynIdStr,
|
||||
this.totalArtNum,
|
||||
this.opus,
|
||||
this.ops,
|
||||
});
|
||||
|
||||
factory ArticleViewData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleViewData(
|
||||
id: json['id'] as int?,
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
templateId: json['template_id'] as int?,
|
||||
state: json['state'] as int?,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Avatar.fromJson(json['author'] as Map<String, dynamic>),
|
||||
reprint: json['reprint'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.cast(),
|
||||
publishTime: json['publish_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
tags: (json['tags'] as List<dynamic>?)
|
||||
?.map((e) => Tag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
words: json['words'] as int?,
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.cast(),
|
||||
list: json['list'] as dynamic,
|
||||
isLike: json['is_like'] as bool?,
|
||||
media: json['media'] == null
|
||||
? null
|
||||
: Media.fromJson(json['media'] as Map<String, dynamic>),
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
original: json['original'] as int?,
|
||||
actId: json['act_id'] as int?,
|
||||
dispute: json['dispute'] as dynamic,
|
||||
authenMark: json['authenMark'] as dynamic,
|
||||
coverAvid: json['cover_avid'] as int?,
|
||||
topVideoInfo: json['top_video_info'] as dynamic,
|
||||
type: json['type'] as int?,
|
||||
checkState: json['check_state'] as int?,
|
||||
originTemplateId: json['origin_template_id'] as int?,
|
||||
privatePub: json['private_pub'] as int?,
|
||||
contentPicList: json['content_pic_list'] as dynamic,
|
||||
content: json['content'] as String?,
|
||||
keywords: json['keywords'] as String?,
|
||||
versionId: json['version_id'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
totalArtNum: json['total_art_num'] as int?,
|
||||
opus: json['opus'] == null
|
||||
? null
|
||||
: ArticleOpus.fromJson(json['opus'] as Map<String, dynamic>),
|
||||
ops:
|
||||
(json['ops'] as List?)?.map((e) => ArticleOps.fromJson(e)).toList(),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/article/article_view/label.dart
Normal file
13
lib/models_new/article/article_view/label.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
|
||||
Label({this.path, this.text, this.labelTheme});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
);
|
||||
}
|
||||
35
lib/models_new/article/article_view/media.dart
Normal file
35
lib/models_new/article/article_view/media.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
int? seasonId;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
);
|
||||
}
|
||||
100
lib/models_new/article/article_view/ops.dart
Normal file
100
lib/models_new/article/article_view/ops.dart
Normal file
@@ -0,0 +1,100 @@
|
||||
class ArticleOps {
|
||||
dynamic insert;
|
||||
Attributes? attributes;
|
||||
|
||||
ArticleOps({this.insert, this.attributes});
|
||||
|
||||
ArticleOps.fromJson(Map<String, dynamic> json) {
|
||||
if (json['insert'] is Map) {
|
||||
insert = Insert.fromJson(json['insert']);
|
||||
} else {
|
||||
insert = json['insert'];
|
||||
}
|
||||
attributes = json['attributes'] == null
|
||||
? null
|
||||
: Attributes.fromJson(json['attributes'] as Map<String, dynamic>);
|
||||
}
|
||||
}
|
||||
|
||||
class Attributes {
|
||||
String? clazz;
|
||||
|
||||
Attributes({this.clazz});
|
||||
|
||||
factory Attributes.fromJson(Map<String, dynamic> json) => Attributes(
|
||||
clazz: json['class'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
class Insert {
|
||||
InsertCard? card;
|
||||
|
||||
Insert({
|
||||
this.card,
|
||||
});
|
||||
|
||||
Insert.fromJson(Map<String, dynamic> json) {
|
||||
if (json['article-card'] != null) {
|
||||
card = InsertCard.fromJson(json['article-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['live-card'] != null) {
|
||||
card = InsertCard.fromJson(json['live-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['goods-card'] != null) {
|
||||
card = InsertCard.fromJson(json['goods-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['video-card'] != null) {
|
||||
card = InsertCard.fromJson(json['video-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['mall-card'] != null) {
|
||||
card = InsertCard.fromJson(json['mall-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['vote-card'] != null) {
|
||||
card = InsertCard.fromJson(json['vote-card']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class InsertCard {
|
||||
dynamic tid;
|
||||
String? id;
|
||||
dynamic alt;
|
||||
String? url;
|
||||
num? width;
|
||||
num? height;
|
||||
num? size;
|
||||
String? status;
|
||||
|
||||
InsertCard({
|
||||
this.tid,
|
||||
this.id,
|
||||
this.alt,
|
||||
this.url,
|
||||
this.width,
|
||||
this.height,
|
||||
this.size,
|
||||
this.status,
|
||||
});
|
||||
|
||||
InsertCard.fromJson(Map<String, dynamic> json) {
|
||||
tid = json['tid'];
|
||||
id = json['id'] == '' ? null : json['id'];
|
||||
alt = json['alt'];
|
||||
url = json['url'];
|
||||
width = json['width'];
|
||||
height = json['height'];
|
||||
size = json['size'];
|
||||
status = json['status'];
|
||||
}
|
||||
}
|
||||
19
lib/models_new/article/article_view/opus.dart
Normal file
19
lib/models_new/article/article_view/opus.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||
|
||||
class ArticleOpus {
|
||||
int? opusid;
|
||||
int? opussource;
|
||||
String? title;
|
||||
List<ArticleContentModel>? content;
|
||||
|
||||
ArticleOpus.fromJson(Map<String, dynamic> json) {
|
||||
opusid = json['opus_id'];
|
||||
opussource = json['opus_source'];
|
||||
title = json['title'];
|
||||
if (json['content']?['paragraphs'] is List) {
|
||||
content = (json['content']['paragraphs'] as List)
|
||||
.map((i) => ArticleContentModel.fromJson(i))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
lib/models_new/article/article_view/stats.dart
Normal file
32
lib/models_new/article/article_view/stats.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/article/article_view/tag.dart
Normal file
11
lib/models_new/article/article_view/tag.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Tag {
|
||||
int? tid;
|
||||
String? name;
|
||||
|
||||
Tag({this.tid, this.name});
|
||||
|
||||
factory Tag.fromJson(Map<String, dynamic> json) => Tag(
|
||||
tid: json['tid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/blacklist/data.dart
Normal file
17
lib/models_new/blacklist/data.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/blacklist/list.dart';
|
||||
|
||||
class BlackListData {
|
||||
List<BlackListItem>? list;
|
||||
int? reVersion;
|
||||
int? total;
|
||||
|
||||
BlackListData({this.list, this.reVersion, this.total});
|
||||
|
||||
factory BlackListData.fromJson(Map<String, dynamic> json) => BlackListData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => BlackListItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
reVersion: json['re_version'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
60
lib/models_new/blacklist/list.dart
Normal file
60
lib/models_new/blacklist/list.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class BlackListItem {
|
||||
int? mid;
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? faceNft;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
String? nftIcon;
|
||||
String? recReason;
|
||||
String? trackId;
|
||||
String? followTime;
|
||||
|
||||
BlackListItem({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.faceNft,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.nftIcon,
|
||||
this.recReason,
|
||||
this.trackId,
|
||||
this.followTime,
|
||||
});
|
||||
|
||||
factory BlackListItem.fromJson(Map<String, dynamic> json) => BlackListItem(
|
||||
mid: json['mid'] as int?,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
special: json['special'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
faceNft: json['face_nft'] as int?,
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
nftIcon: json['nft_icon'] as String?,
|
||||
recReason: json['rec_reason'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
followTime: json['follow_time'] as String?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/dynamic/dyn_reserve/data.dart
Normal file
23
lib/models_new/dynamic/dyn_reserve/data.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class DynReserveData {
|
||||
int? finalBtnStatus;
|
||||
int? btnMode;
|
||||
int? reserveUpdate;
|
||||
String? descUpdate;
|
||||
String? toast;
|
||||
|
||||
DynReserveData({
|
||||
this.finalBtnStatus,
|
||||
this.btnMode,
|
||||
this.reserveUpdate,
|
||||
this.descUpdate,
|
||||
this.toast,
|
||||
});
|
||||
|
||||
factory DynReserveData.fromJson(Map<String, dynamic> json) => DynReserveData(
|
||||
finalBtnStatus: json['final_btn_status'] as int?,
|
||||
btnMode: json['btn_mode'] as int?,
|
||||
reserveUpdate: json['reserve_update'] as int?,
|
||||
descUpdate: json['desc_update'] as String?,
|
||||
toast: json['toast'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/dynamic/dyn_topic_feed/all_sort_by.dart
Normal file
11
lib/models_new/dynamic/dyn_topic_feed/all_sort_by.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class AllSortBy {
|
||||
int? sortBy;
|
||||
String? sortName;
|
||||
|
||||
AllSortBy({this.sortBy, this.sortName});
|
||||
|
||||
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
||||
sortBy: json['sort_by'] as int?,
|
||||
sortName: json['sort_name'] as String?,
|
||||
);
|
||||
}
|
||||
16
lib/models_new/dynamic/dyn_topic_feed/item.dart
Normal file
16
lib/models_new/dynamic/dyn_topic_feed/item.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
|
||||
class TopicCardItem {
|
||||
DynamicItemModel? dynamicCardItem;
|
||||
String? topicType;
|
||||
|
||||
TopicCardItem({this.dynamicCardItem, this.topicType});
|
||||
|
||||
factory TopicCardItem.fromJson(Map<String, dynamic> json) => TopicCardItem(
|
||||
dynamicCardItem: json['dynamic_card_item'] == null
|
||||
? null
|
||||
: DynamicItemModel.fromJson(
|
||||
json['dynamic_card_item'] as Map<String, dynamic>),
|
||||
topicType: json['topic_type'] as String?,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/dynamic/dyn_topic_feed/topic_card_list.dart
Normal file
28
lib/models_new/dynamic/dyn_topic_feed/topic_card_list.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/item.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart';
|
||||
|
||||
class TopicCardList {
|
||||
bool? hasMore;
|
||||
List<TopicCardItem>? items;
|
||||
String? offset;
|
||||
TopicSortByConf? topicSortByConf;
|
||||
|
||||
TopicCardList({
|
||||
this.hasMore,
|
||||
this.items,
|
||||
this.offset,
|
||||
this.topicSortByConf,
|
||||
});
|
||||
|
||||
factory TopicCardList.fromJson(Map<String, dynamic> json) => TopicCardList(
|
||||
hasMore: json['has_more'] as bool?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => TopicCardItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
topicSortByConf: json['topic_sort_by_conf'] == null
|
||||
? null
|
||||
: TopicSortByConf.fromJson(
|
||||
json['topic_sort_by_conf'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/all_sort_by.dart';
|
||||
|
||||
class TopicSortByConf {
|
||||
List<AllSortBy>? allSortBy;
|
||||
int? defaultSortBy;
|
||||
int? showSortBy;
|
||||
|
||||
TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy});
|
||||
|
||||
factory TopicSortByConf.fromJson(Map<String, dynamic> json) {
|
||||
return TopicSortByConf(
|
||||
allSortBy: (json['all_sort_by'] as List<dynamic>?)
|
||||
?.map((e) => AllSortBy.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
defaultSortBy: json['default_sort_by'] as int?,
|
||||
showSortBy: json['show_sort_by'] as int?,
|
||||
);
|
||||
}
|
||||
}
|
||||
34
lib/models_new/dynamic/dyn_topic_pub_search/data.dart
Normal file
34
lib/models_new/dynamic/dyn_topic_pub_search/data.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/new_topic.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/page_info.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/topic_item.dart';
|
||||
|
||||
class TopicPubSearchData {
|
||||
NewTopic? newTopic;
|
||||
bool? hasCreateJurisdiction;
|
||||
List<TopicPubSearchItem>? topicItems;
|
||||
String? requestId;
|
||||
PageInfo? pageInfo;
|
||||
|
||||
TopicPubSearchData({
|
||||
this.newTopic,
|
||||
this.hasCreateJurisdiction,
|
||||
this.topicItems,
|
||||
this.requestId,
|
||||
this.pageInfo,
|
||||
});
|
||||
|
||||
factory TopicPubSearchData.fromJson(Map<String, dynamic> json) =>
|
||||
TopicPubSearchData(
|
||||
newTopic: json['new_topic'] == null
|
||||
? null
|
||||
: NewTopic.fromJson(json['new_topic'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
topicItems: (json['topic_items'] as List<dynamic>?)
|
||||
?.map((e) => TopicPubSearchItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
requestId: json['request_id'] as String?,
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class NewTopic {
|
||||
String? name;
|
||||
|
||||
NewTopic({this.name});
|
||||
|
||||
factory NewTopic.fromJson(Map<String, dynamic> json) => NewTopic(
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart
Normal file
11
lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class PageInfo {
|
||||
int? offset;
|
||||
bool? hasMore;
|
||||
|
||||
PageInfo({this.offset, this.hasMore});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
offset: json['offset'] as int?,
|
||||
hasMore: json['has_more'] as bool?,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/dynamic/dyn_topic_pub_search/topic_item.dart
Normal file
30
lib/models_new/dynamic/dyn_topic_pub_search/topic_item.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
class TopicPubSearchItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? statDesc;
|
||||
String? description;
|
||||
bool? showInteractData;
|
||||
|
||||
TopicPubSearchItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.statDesc,
|
||||
this.description,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory TopicPubSearchItem.fromJson(Map<String, dynamic> json) =>
|
||||
TopicPubSearchItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
statDesc: json['stat_desc'] as String?,
|
||||
description: json['description'] as String?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
);
|
||||
}
|
||||
31
lib/models_new/dynamic/dyn_topic_top/top_details.dart
Normal file
31
lib/models_new/dynamic/dyn_topic_top/top_details.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_creator.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_item.dart';
|
||||
|
||||
class TopDetails {
|
||||
TopicItem? topicItem;
|
||||
TopicCreator? topicCreator;
|
||||
bool? hasCreateJurisdiction;
|
||||
int? wordColor;
|
||||
bool? closePubLayerEntry;
|
||||
|
||||
TopDetails({
|
||||
this.topicItem,
|
||||
this.topicCreator,
|
||||
this.hasCreateJurisdiction,
|
||||
this.wordColor,
|
||||
this.closePubLayerEntry,
|
||||
});
|
||||
|
||||
factory TopDetails.fromJson(Map<String, dynamic> json) => TopDetails(
|
||||
topicItem: json['topic_item'] == null
|
||||
? null
|
||||
: TopicItem.fromJson(json['topic_item'] as Map<String, dynamic>),
|
||||
topicCreator: json['topic_creator'] == null
|
||||
? null
|
||||
: TopicCreator.fromJson(
|
||||
json['topic_creator'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
wordColor: json['word_color'] as int?,
|
||||
closePubLayerEntry: json['close_pub_layer_entry'] as bool?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/dynamic/dyn_topic_top/topic_creator.dart
Normal file
17
lib/models_new/dynamic/dyn_topic_top/topic_creator.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class TopicCreator {
|
||||
int? uid;
|
||||
String? face;
|
||||
String? name;
|
||||
|
||||
TopicCreator({
|
||||
this.uid,
|
||||
this.face,
|
||||
this.name,
|
||||
});
|
||||
|
||||
factory TopicCreator.fromJson(Map<String, dynamic> json) => TopicCreator(
|
||||
uid: json['uid'] as int?,
|
||||
face: json['face'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
56
lib/models_new/dynamic/dyn_topic_top/topic_item.dart
Normal file
56
lib/models_new/dynamic/dyn_topic_top/topic_item.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
class TopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
late int fav;
|
||||
late int like;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
bool? isFav;
|
||||
bool? isLike;
|
||||
|
||||
TopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
required this.fav,
|
||||
required this.like,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
this.isFav,
|
||||
this.isLike,
|
||||
});
|
||||
|
||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int? ?? 0,
|
||||
discuss: json['discuss'] as int? ?? 0,
|
||||
fav: json['fav'] as int? ?? 0,
|
||||
like: json['like'] as int? ?? 0,
|
||||
dynamics: json['dynamics'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
backColor: json['back_color'] as String?,
|
||||
description: json['description'] as String?,
|
||||
sharePic: json['share_pic'] as String?,
|
||||
shareUrl: json['share_url'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
isFav: json['is_fav'] as bool?,
|
||||
isLike: json['is_like'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/emote/data.dart
Normal file
13
lib/models_new/emote/data.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/emote/package.dart';
|
||||
|
||||
class EmoteModelData {
|
||||
List<Package>? packages;
|
||||
|
||||
EmoteModelData({this.packages});
|
||||
|
||||
factory EmoteModelData.fromJson(Map<String, dynamic> json) => EmoteModelData(
|
||||
packages: (json['packages'] as List<dynamic>?)
|
||||
?.map((e) => Package.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
21
lib/models_new/emote/emote.dart
Normal file
21
lib/models_new/emote/emote.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/emote/meta.dart';
|
||||
|
||||
class Emote {
|
||||
String? text;
|
||||
String? url;
|
||||
Meta? meta;
|
||||
|
||||
Emote({
|
||||
this.text,
|
||||
this.url,
|
||||
this.meta,
|
||||
});
|
||||
|
||||
factory Emote.fromJson(Map<String, dynamic> json) => Emote(
|
||||
text: json['text'] as String?,
|
||||
url: json['url'] as String?,
|
||||
meta: json['meta'] == null
|
||||
? null
|
||||
: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
9
lib/models_new/emote/meta.dart
Normal file
9
lib/models_new/emote/meta.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Meta {
|
||||
int? size;
|
||||
|
||||
Meta({this.size});
|
||||
|
||||
factory Meta.fromJson(Map<String, dynamic> json) => Meta(
|
||||
size: json['size'] as int?,
|
||||
);
|
||||
}
|
||||
21
lib/models_new/emote/package.dart
Normal file
21
lib/models_new/emote/package.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/emote/emote.dart';
|
||||
|
||||
class Package {
|
||||
String? url;
|
||||
int? type;
|
||||
List<Emote>? emote;
|
||||
|
||||
Package({
|
||||
this.url,
|
||||
this.type,
|
||||
this.emote,
|
||||
});
|
||||
|
||||
factory Package.fromJson(Map<String, dynamic> json) => Package(
|
||||
url: json['url'] as String?,
|
||||
type: json['type'] as int?,
|
||||
emote: (json['emote'] as List<dynamic>?)
|
||||
?.map((e) => Emote.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
19
lib/models_new/fans/data.dart
Normal file
19
lib/models_new/fans/data.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/fans/list.dart';
|
||||
|
||||
class FansData {
|
||||
List<FansItemModel>? list;
|
||||
String? offset;
|
||||
int? reVersion;
|
||||
int? total;
|
||||
|
||||
FansData({this.list, this.offset, this.reVersion, this.total});
|
||||
|
||||
factory FansData.fromJson(Map<String, dynamic> json) => FansData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FansItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
reVersion: json['re_version'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
60
lib/models_new/fans/list.dart
Normal file
60
lib/models_new/fans/list.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FansItemModel {
|
||||
int? mid;
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? faceNft;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
String? nftIcon;
|
||||
String? recReason;
|
||||
String? trackId;
|
||||
String? followTime;
|
||||
|
||||
FansItemModel({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.faceNft,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.nftIcon,
|
||||
this.recReason,
|
||||
this.trackId,
|
||||
this.followTime,
|
||||
});
|
||||
|
||||
factory FansItemModel.fromJson(Map<String, dynamic> json) => FansItemModel(
|
||||
mid: json['mid'] as int?,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
special: json['special'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
faceNft: json['face_nft'] as int?,
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
nftIcon: json['nft_icon'] as String?,
|
||||
recReason: json['rec_reason'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
followTime: json['follow_time'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/fav/fav_article/author.dart
Normal file
13
lib/models_new/fav/fav_article/author.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Author {
|
||||
String? name;
|
||||
String? face;
|
||||
String? mid;
|
||||
|
||||
Author({this.name, this.face, this.mid});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
mid: json['mid'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/fav/fav_article/cover.dart
Normal file
13
lib/models_new/fav/fav_article/cover.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
int? width;
|
||||
int? height;
|
||||
|
||||
Cover({this.url, this.width, this.height});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/fav/fav_article/data.dart
Normal file
28
lib/models_new/fav/fav_article/data.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/item.dart';
|
||||
|
||||
class FavArticleData {
|
||||
List<FavArticleItemModel>? items;
|
||||
bool? hasMore;
|
||||
String? offset;
|
||||
String? updateNum;
|
||||
String? updateBaseline;
|
||||
|
||||
FavArticleData({
|
||||
this.items,
|
||||
this.hasMore,
|
||||
this.offset,
|
||||
this.updateNum,
|
||||
this.updateBaseline,
|
||||
});
|
||||
|
||||
factory FavArticleData.fromJson(Map<String, dynamic> json) => FavArticleData(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => FavArticleItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
offset: json['offset'] as String?,
|
||||
updateNum: json['update_num'] as String?,
|
||||
updateBaseline: json['update_baseline'] as String?,
|
||||
);
|
||||
}
|
||||
43
lib/models_new/fav/fav_article/item.dart
Normal file
43
lib/models_new/fav/fav_article/item.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/author.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/cover.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/stat.dart';
|
||||
|
||||
class FavArticleItemModel {
|
||||
String? jumpUrl;
|
||||
String? opusId;
|
||||
String? content;
|
||||
dynamic badge;
|
||||
Author? author;
|
||||
Cover? cover;
|
||||
Stat? stat;
|
||||
String? pubTime;
|
||||
|
||||
FavArticleItemModel({
|
||||
this.jumpUrl,
|
||||
this.opusId,
|
||||
this.content,
|
||||
this.badge,
|
||||
this.author,
|
||||
this.cover,
|
||||
this.stat,
|
||||
this.pubTime,
|
||||
});
|
||||
|
||||
factory FavArticleItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavArticleItemModel(
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
opusId: json['opus_id'] as String?,
|
||||
content: json['content'] as String?,
|
||||
badge: json['badge'] as dynamic,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
cover: json['cover'] == null
|
||||
? null
|
||||
: Cover.fromJson(json['cover'] as Map<String, dynamic>),
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
pubTime: json['pub_time'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_article/stat.dart
Normal file
11
lib/models_new/fav/fav_article/stat.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Stat {
|
||||
String? view;
|
||||
String? like;
|
||||
|
||||
Stat({this.view, this.like});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
view: json['view'] as String?,
|
||||
like: json['like'] as String?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/fav/fav_detail/cnt_info.dart
Normal file
23
lib/models_new/fav/fav_detail/cnt_info.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? share;
|
||||
int? danmaku;
|
||||
|
||||
CntInfo({
|
||||
this.collect,
|
||||
this.play,
|
||||
this.thumbUp,
|
||||
this.share,
|
||||
this.danmaku,
|
||||
});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
share: json['share'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
);
|
||||
}
|
||||
22
lib/models_new/fav/fav_detail/data.dart
Normal file
22
lib/models_new/fav/fav_detail/data.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/media.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/list.dart';
|
||||
|
||||
class FavDetailData {
|
||||
FavVideoItemModel? info;
|
||||
List<FavDetailItemModel>? medias;
|
||||
bool? hasMore;
|
||||
int? ttl;
|
||||
|
||||
FavDetailData({this.info, this.medias, this.hasMore, this.ttl});
|
||||
|
||||
factory FavDetailData.fromJson(Map<String, dynamic> json) => FavDetailData(
|
||||
info: json['info'] == null
|
||||
? null
|
||||
: FavVideoItemModel.fromJson(json['info'] as Map<String, dynamic>),
|
||||
medias: (json['medias'] as List<dynamic>?)
|
||||
?.map((e) => FavDetailItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
ttl: json['ttl'] as int?,
|
||||
);
|
||||
}
|
||||
69
lib/models_new/fav/fav_detail/info.dart
Normal file
69
lib/models_new/fav/fav_detail/info.dart
Normal file
@@ -0,0 +1,69 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/upper.dart';
|
||||
|
||||
class FavDetailInfo {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Upper? upper;
|
||||
int? coverType;
|
||||
CntInfo? cntInfo;
|
||||
int? type;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? likeState;
|
||||
int? mediaCount;
|
||||
bool? isTop;
|
||||
|
||||
FavDetailInfo({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.cntInfo,
|
||||
this.type,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.likeState,
|
||||
this.mediaCount,
|
||||
this.isTop,
|
||||
});
|
||||
|
||||
factory FavDetailInfo.fromJson(Map<String, dynamic> json) => FavDetailInfo(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
type: json['type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
likeState: json['like_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
);
|
||||
}
|
||||
78
lib/models_new/fav/fav_detail/media.dart
Normal file
78
lib/models_new/fav/fav_detail/media.dart
Normal file
@@ -0,0 +1,78 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/ogv.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/ugc.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/upper.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class FavDetailItemModel with MultiSelectData {
|
||||
int? id;
|
||||
int? type;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? intro;
|
||||
int? page;
|
||||
int? duration;
|
||||
Upper? upper;
|
||||
int? attr;
|
||||
CntInfo? cntInfo;
|
||||
String? link;
|
||||
int? ctime;
|
||||
int? pubtime;
|
||||
int? favTime;
|
||||
String? bvId;
|
||||
String? bvid;
|
||||
Ogv? ogv;
|
||||
Ugc? ugc;
|
||||
String? mediaListLink;
|
||||
|
||||
FavDetailItemModel({
|
||||
this.id,
|
||||
this.type,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.intro,
|
||||
this.page,
|
||||
this.duration,
|
||||
this.upper,
|
||||
this.attr,
|
||||
this.cntInfo,
|
||||
this.link,
|
||||
this.ctime,
|
||||
this.pubtime,
|
||||
this.favTime,
|
||||
this.bvId,
|
||||
this.bvid,
|
||||
this.ogv,
|
||||
this.ugc,
|
||||
this.mediaListLink,
|
||||
});
|
||||
|
||||
factory FavDetailItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavDetailItemModel(
|
||||
id: json['id'] as int?,
|
||||
type: json['type'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
intro: json['intro'] as String?,
|
||||
page: json['page'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
attr: json['attr'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
link: json['link'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
pubtime: json['pubtime'] as int?,
|
||||
favTime: json['fav_time'] as int?,
|
||||
bvId: json['bv_id'] as String?,
|
||||
bvid: json['bvid'] as String?,
|
||||
ogv: json['ogv'] == null ? null : Ogv.fromJson(json['ogv']),
|
||||
ugc: json['ugc'] == null
|
||||
? null
|
||||
: Ugc.fromJson(json['ugc'] as Map<String, dynamic>),
|
||||
mediaListLink: json['media_list_link'] as String?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/fav/fav_detail/ogv.dart
Normal file
17
lib/models_new/fav/fav_detail/ogv.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
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'],
|
||||
);
|
||||
}
|
||||
9
lib/models_new/fav/fav_detail/ugc.dart
Normal file
9
lib/models_new/fav/fav_detail/ugc.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Ugc {
|
||||
int? firstCid;
|
||||
|
||||
Ugc({this.firstCid});
|
||||
|
||||
factory Ugc.fromJson(Map<String, dynamic> json) => Ugc(
|
||||
firstCid: json['first_cid'] as int?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/fav/fav_detail/upper.dart
Normal file
26
lib/models_new/fav/fav_detail/upper.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class Upper {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
bool? followed;
|
||||
int? vipType;
|
||||
int? vipStatue;
|
||||
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.followed,
|
||||
this.vipType,
|
||||
this.vipStatue,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
followed: json['followed'] as bool?,
|
||||
vipType: json['vip_type'] as int?,
|
||||
vipStatue: json['vip_statue'] as int?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/fav/fav_folder_info/cnt_info.dart
Normal file
15
lib/models_new/fav/fav_folder_info/cnt_info.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? share;
|
||||
|
||||
CntInfo({this.collect, this.play, this.thumbUp, this.share});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
share: json['share'] as int?,
|
||||
);
|
||||
}
|
||||
69
lib/models_new/fav/fav_folder_info/data.dart
Normal file
69
lib/models_new/fav/fav_folder_info/data.dart
Normal file
@@ -0,0 +1,69 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_folder_info/cnt_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_folder_info/upper.dart';
|
||||
|
||||
class FolderInfo {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Upper? upper;
|
||||
int? coverType;
|
||||
CntInfo? cntInfo;
|
||||
int? type;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? likeState;
|
||||
int? mediaCount;
|
||||
bool? isTop;
|
||||
|
||||
FolderInfo({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.cntInfo,
|
||||
this.type,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.likeState,
|
||||
this.mediaCount,
|
||||
this.isTop,
|
||||
});
|
||||
|
||||
factory FolderInfo.fromJson(Map<String, dynamic> json) => FolderInfo(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
type: json['type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
likeState: json['like_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/fav/fav_folder_info/upper.dart
Normal file
26
lib/models_new/fav/fav_folder_info/upper.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class Upper {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
bool? followed;
|
||||
int? vipType;
|
||||
int? vipStatue;
|
||||
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.followed,
|
||||
this.vipType,
|
||||
this.vipStatue,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
followed: json['followed'] as bool?,
|
||||
vipType: json['vip_type'] as int?,
|
||||
vipStatue: json['vip_statue'] as int?,
|
||||
);
|
||||
}
|
||||
29
lib/models_new/fav/fav_note/arc.dart
Normal file
29
lib/models_new/fav/fav_note/arc.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
class Arc {
|
||||
int? oid;
|
||||
String? bvid;
|
||||
String? pic;
|
||||
String? desc;
|
||||
int? status;
|
||||
int? oidType;
|
||||
int? aid;
|
||||
|
||||
Arc({
|
||||
this.oid,
|
||||
this.bvid,
|
||||
this.pic,
|
||||
this.desc,
|
||||
this.status,
|
||||
this.oidType,
|
||||
this.aid,
|
||||
});
|
||||
|
||||
factory Arc.fromJson(Map<String, dynamic> json) => Arc(
|
||||
oid: json['oid'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
pic: json['pic'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
status: json['status'] as int?,
|
||||
oidType: json['oid_type'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/fav/fav_note/data.dart
Normal file
18
lib/models_new/fav/fav_note/data.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_note/list.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_note/page.dart';
|
||||
|
||||
class FavNoteData {
|
||||
List<FavNoteItemModel>? list;
|
||||
Page? page;
|
||||
|
||||
FavNoteData({this.list, this.page});
|
||||
|
||||
factory FavNoteData.fromJson(Map<String, dynamic> json) => FavNoteData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FavNoteItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Page.fromJson(json['page'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
31
lib/models_new/fav/fav_note/list.dart
Normal file
31
lib/models_new/fav/fav_note/list.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class FavNoteItemModel with MultiSelectData {
|
||||
FavNoteItemModel({
|
||||
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;
|
||||
|
||||
FavNoteItemModel.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'];
|
||||
}
|
||||
}
|
||||
13
lib/models_new/fav/fav_note/page.dart
Normal file
13
lib/models_new/fav/fav_note/page.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Page {
|
||||
int? total;
|
||||
int? size;
|
||||
int? num;
|
||||
|
||||
Page({this.total, this.size, this.num});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
total: json['total'] as int?,
|
||||
size: json['size'] as int?,
|
||||
num: json['num'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/area.dart
Normal file
11
lib/models_new/fav/fav_pgc/area.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Area {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Area({this.id, this.name});
|
||||
|
||||
factory Area.fromJson(Map<String, dynamic> json) => Area(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
27
lib/models_new/fav/fav_pgc/badge_info.dart
Normal file
27
lib/models_new/fav/fav_pgc/badge_info.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class BadgeInfo {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
BadgeInfo({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory BadgeInfo.fromJson(Map<String, dynamic> json) => BadgeInfo(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
19
lib/models_new/fav/fav_pgc/badge_infos.dart
Normal file
19
lib/models_new/fav/fav_pgc/badge_infos.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/content_attr.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/vip_or_pay.dart';
|
||||
|
||||
class BadgeInfos {
|
||||
ContentAttr? contentAttr;
|
||||
VipOrPay? vipOrPay;
|
||||
|
||||
BadgeInfos({this.contentAttr, this.vipOrPay});
|
||||
|
||||
factory BadgeInfos.fromJson(Map<String, dynamic> json) => BadgeInfos(
|
||||
contentAttr: json['content_attr'] == null
|
||||
? null
|
||||
: ContentAttr.fromJson(
|
||||
json['content_attr'] as Map<String, dynamic>),
|
||||
vipOrPay: json['vip_or_pay'] == null
|
||||
? null
|
||||
: VipOrPay.fromJson(json['vip_or_pay'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
9
lib/models_new/fav/fav_pgc/cc_on_lock.dart
Normal file
9
lib/models_new/fav/fav_pgc/cc_on_lock.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class CcOnLock {
|
||||
String? typeUrl;
|
||||
|
||||
CcOnLock({this.typeUrl});
|
||||
|
||||
factory CcOnLock.fromJson(Map<String, dynamic> json) => CcOnLock(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
36
lib/models_new/fav/fav_pgc/config_attrs.dart
Normal file
36
lib/models_new/fav/fav_pgc/config_attrs.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/cc_on_lock.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_hd.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_ott.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_pink.dart';
|
||||
|
||||
class ConfigAttrs {
|
||||
CcOnLock? ccOnLock;
|
||||
HighlightIneffectiveHd? highlightIneffectiveHd;
|
||||
HighlightIneffectiveOtt? highlightIneffectiveOtt;
|
||||
HighlightIneffectivePink? highlightIneffectivePink;
|
||||
|
||||
ConfigAttrs({
|
||||
this.ccOnLock,
|
||||
this.highlightIneffectiveHd,
|
||||
this.highlightIneffectiveOtt,
|
||||
this.highlightIneffectivePink,
|
||||
});
|
||||
|
||||
factory ConfigAttrs.fromJson(Map<String, dynamic> json) => ConfigAttrs(
|
||||
ccOnLock: json['cc_on_lock'] == null
|
||||
? null
|
||||
: CcOnLock.fromJson(json['cc_on_lock'] as Map<String, dynamic>),
|
||||
highlightIneffectiveHd: json['highlight_ineffective_hd'] == null
|
||||
? null
|
||||
: HighlightIneffectiveHd.fromJson(
|
||||
json['highlight_ineffective_hd'] as Map<String, dynamic>),
|
||||
highlightIneffectiveOtt: json['highlight_ineffective_ott'] == null
|
||||
? null
|
||||
: HighlightIneffectiveOtt.fromJson(
|
||||
json['highlight_ineffective_ott'] as Map<String, dynamic>),
|
||||
highlightIneffectivePink: json['highlight_ineffective_pink'] == null
|
||||
? null
|
||||
: HighlightIneffectivePink.fromJson(
|
||||
json['highlight_ineffective_pink'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
27
lib/models_new/fav/fav_pgc/content_attr.dart
Normal file
27
lib/models_new/fav/fav_pgc/content_attr.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class ContentAttr {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
ContentAttr({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory ContentAttr.fromJson(Map<String, dynamic> json) => ContentAttr(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
19
lib/models_new/fav/fav_pgc/data.dart
Normal file
19
lib/models_new/fav/fav_pgc/data.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/list.dart';
|
||||
|
||||
class FavPgcData {
|
||||
List<FavPgcItemModel>? list;
|
||||
int? pn;
|
||||
int? ps;
|
||||
int? total;
|
||||
|
||||
FavPgcData({this.list, this.pn, this.ps, this.total});
|
||||
|
||||
factory FavPgcData.fromJson(Map<String, dynamic> json) => FavPgcData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FavPgcItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pn: json['pn'] as int?,
|
||||
ps: json['ps'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/fav/fav_pgc/first_ep_info.dart
Normal file
26
lib/models_new/fav/fav_pgc/first_ep_info.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class FirstEpInfo {
|
||||
int? id;
|
||||
String? cover;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? pubTime;
|
||||
int? duration;
|
||||
|
||||
FirstEpInfo({
|
||||
this.id,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.pubTime,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory FirstEpInfo.fromJson(Map<String, dynamic> json) => FirstEpInfo(
|
||||
id: json['id'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
pubTime: json['pub_time'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/highlight_ineffective_hd.dart
Normal file
11
lib/models_new/fav/fav_pgc/highlight_ineffective_hd.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class HighlightIneffectiveHd {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectiveHd({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectiveHd.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectiveHd(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/highlight_ineffective_ott.dart
Normal file
11
lib/models_new/fav/fav_pgc/highlight_ineffective_ott.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class HighlightIneffectiveOtt {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectiveOtt({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectiveOtt.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectiveOtt(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/highlight_ineffective_pink.dart
Normal file
11
lib/models_new/fav/fav_pgc/highlight_ineffective_pink.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class HighlightIneffectivePink {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectivePink({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectivePink.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectivePink(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
208
lib/models_new/fav/fav_pgc/list.dart
Normal file
208
lib/models_new/fav/fav_pgc/list.dart
Normal file
@@ -0,0 +1,208 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/area.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/badge_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/badge_infos.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/config_attrs.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/first_ep_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/new_ep.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/producer.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/publish.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/rating.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/rights.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/section.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/series.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/stat.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class FavPgcItemModel with MultiSelectData {
|
||||
int? seasonId;
|
||||
int? mediaId;
|
||||
int? seasonType;
|
||||
String? seasonTypeName;
|
||||
String? title;
|
||||
String? cover;
|
||||
int? totalCount;
|
||||
int? isFinish;
|
||||
int? isStarted;
|
||||
int? isPlay;
|
||||
String? badge;
|
||||
int? badgeType;
|
||||
Rights? rights;
|
||||
Stat? stat;
|
||||
NewEp? newEp;
|
||||
Rating? rating;
|
||||
String? squareCover;
|
||||
int? seasonStatus;
|
||||
String? seasonTitle;
|
||||
String? badgeEp;
|
||||
int? mediaAttr;
|
||||
int? seasonAttr;
|
||||
String? evaluate;
|
||||
List<Area>? areas;
|
||||
String? subtitle;
|
||||
int? firstEp;
|
||||
int? canWatch;
|
||||
Series? series;
|
||||
Publish? publish;
|
||||
int? mode;
|
||||
List<Section>? section;
|
||||
String? url;
|
||||
BadgeInfo? badgeInfo;
|
||||
String? renewalTime;
|
||||
FirstEpInfo? firstEpInfo;
|
||||
int? formalEpCount;
|
||||
String? shortUrl;
|
||||
BadgeInfos? badgeInfos;
|
||||
String? seasonVersion;
|
||||
String? horizontalCover169;
|
||||
String? horizontalCover1610;
|
||||
String? subtitle14;
|
||||
int? viewableCrowdType;
|
||||
List<Producer>? producers;
|
||||
String? summary;
|
||||
List<String>? styles;
|
||||
ConfigAttrs? configAttrs;
|
||||
int? followStatus;
|
||||
int? isNew;
|
||||
String? progress;
|
||||
bool? bothFollow;
|
||||
String? subtitle25;
|
||||
|
||||
FavPgcItemModel({
|
||||
this.seasonId,
|
||||
this.mediaId,
|
||||
this.seasonType,
|
||||
this.seasonTypeName,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.totalCount,
|
||||
this.isFinish,
|
||||
this.isStarted,
|
||||
this.isPlay,
|
||||
this.badge,
|
||||
this.badgeType,
|
||||
this.rights,
|
||||
this.stat,
|
||||
this.newEp,
|
||||
this.rating,
|
||||
this.squareCover,
|
||||
this.seasonStatus,
|
||||
this.seasonTitle,
|
||||
this.badgeEp,
|
||||
this.mediaAttr,
|
||||
this.seasonAttr,
|
||||
this.evaluate,
|
||||
this.areas,
|
||||
this.subtitle,
|
||||
this.firstEp,
|
||||
this.canWatch,
|
||||
this.series,
|
||||
this.publish,
|
||||
this.mode,
|
||||
this.section,
|
||||
this.url,
|
||||
this.badgeInfo,
|
||||
this.renewalTime,
|
||||
this.firstEpInfo,
|
||||
this.formalEpCount,
|
||||
this.shortUrl,
|
||||
this.badgeInfos,
|
||||
this.seasonVersion,
|
||||
this.horizontalCover169,
|
||||
this.horizontalCover1610,
|
||||
this.subtitle14,
|
||||
this.viewableCrowdType,
|
||||
this.producers,
|
||||
this.summary,
|
||||
this.styles,
|
||||
this.configAttrs,
|
||||
this.followStatus,
|
||||
this.isNew,
|
||||
this.progress,
|
||||
this.bothFollow,
|
||||
this.subtitle25,
|
||||
});
|
||||
|
||||
factory FavPgcItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavPgcItemModel(
|
||||
seasonId: json['season_id'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
seasonType: json['season_type'] as int?,
|
||||
seasonTypeName: json['season_type_name'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
totalCount: json['total_count'] as int?,
|
||||
isFinish: json['is_finish'] as int?,
|
||||
isStarted: json['is_started'] as int?,
|
||||
isPlay: json['is_play'] as int?,
|
||||
badge: json['badge'] as String?,
|
||||
badgeType: json['badge_type'] as int?,
|
||||
rights: json['rights'] == null
|
||||
? null
|
||||
: Rights.fromJson(json['rights'] as Map<String, dynamic>),
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
newEp: json['new_ep'] == null
|
||||
? null
|
||||
: NewEp.fromJson(json['new_ep'] as Map<String, dynamic>),
|
||||
rating: json['rating'] == null
|
||||
? null
|
||||
: Rating.fromJson(json['rating'] as Map<String, dynamic>),
|
||||
squareCover: json['square_cover'] as String?,
|
||||
seasonStatus: json['season_status'] as int?,
|
||||
seasonTitle: json['season_title'] as String?,
|
||||
badgeEp: json['badge_ep'] as String?,
|
||||
mediaAttr: json['media_attr'] as int?,
|
||||
seasonAttr: json['season_attr'] as int?,
|
||||
evaluate: json['evaluate'] as String?,
|
||||
areas: (json['areas'] as List<dynamic>?)
|
||||
?.map((e) => Area.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
subtitle: json['subtitle'] as String?,
|
||||
firstEp: json['first_ep'] as int?,
|
||||
canWatch: json['can_watch'] as int?,
|
||||
series: json['series'] == null
|
||||
? null
|
||||
: Series.fromJson(json['series'] as Map<String, dynamic>),
|
||||
publish: json['publish'] == null
|
||||
? null
|
||||
: Publish.fromJson(json['publish'] as Map<String, dynamic>),
|
||||
mode: json['mode'] as int?,
|
||||
section: (json['section'] as List<dynamic>?)
|
||||
?.map((e) => Section.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
url: json['url'] as String?,
|
||||
badgeInfo: json['badge_info'] == null
|
||||
? null
|
||||
: BadgeInfo.fromJson(json['badge_info'] as Map<String, dynamic>),
|
||||
renewalTime: json['renewal_time'] as String?,
|
||||
firstEpInfo: json['first_ep_info'] == null
|
||||
? null
|
||||
: FirstEpInfo.fromJson(
|
||||
json['first_ep_info'] as Map<String, dynamic>),
|
||||
formalEpCount: json['formal_ep_count'] as int?,
|
||||
shortUrl: json['short_url'] as String?,
|
||||
badgeInfos: json['badge_infos'] == null
|
||||
? null
|
||||
: BadgeInfos.fromJson(json['badge_infos'] as Map<String, dynamic>),
|
||||
seasonVersion: json['season_version'] as String?,
|
||||
horizontalCover169: json['horizontal_cover_16_9'] as String?,
|
||||
horizontalCover1610: json['horizontal_cover_16_10'] as String?,
|
||||
subtitle14: json['subtitle_14'] as String?,
|
||||
viewableCrowdType: json['viewable_crowd_type'] as int?,
|
||||
producers: (json['producers'] as List<dynamic>?)
|
||||
?.map((e) => Producer.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
summary: json['summary'] as String?,
|
||||
styles: (json['styles'] as List?)?.cast(),
|
||||
configAttrs: json['config_attrs'] == null
|
||||
? null
|
||||
: ConfigAttrs.fromJson(
|
||||
json['config_attrs'] as Map<String, dynamic>),
|
||||
followStatus: json['follow_status'] as int?,
|
||||
isNew: json['is_new'] as int?,
|
||||
progress: json['progress'] as String?,
|
||||
bothFollow: json['both_follow'] as bool?,
|
||||
subtitle25: json['subtitle_25'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/multi_img.dart
Normal file
11
lib/models_new/fav/fav_pgc/multi_img.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class MultiImg {
|
||||
String? color;
|
||||
String? mediumRemind;
|
||||
|
||||
MultiImg({this.color, this.mediumRemind});
|
||||
|
||||
factory MultiImg.fromJson(Map<String, dynamic> json) => MultiImg(
|
||||
color: json['color'] as String?,
|
||||
mediumRemind: json['medium_remind'] as String?,
|
||||
);
|
||||
}
|
||||
29
lib/models_new/fav/fav_pgc/new_ep.dart
Normal file
29
lib/models_new/fav/fav_pgc/new_ep.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
class NewEp {
|
||||
int? id;
|
||||
String? indexShow;
|
||||
String? cover;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? pubTime;
|
||||
int? duration;
|
||||
|
||||
NewEp({
|
||||
this.id,
|
||||
this.indexShow,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.pubTime,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory NewEp.fromJson(Map<String, dynamic> json) => NewEp(
|
||||
id: json['id'] as int?,
|
||||
indexShow: json['index_show'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
pubTime: json['pub_time'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/fav/fav_pgc/producer.dart
Normal file
15
lib/models_new/fav/fav_pgc/producer.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class Producer {
|
||||
int? mid;
|
||||
int? type;
|
||||
int? isContribute;
|
||||
String? title;
|
||||
|
||||
Producer({this.mid, this.type, this.isContribute, this.title});
|
||||
|
||||
factory Producer.fromJson(Map<String, dynamic> json) => Producer(
|
||||
mid: json['mid'] as int?,
|
||||
type: json['type'] as int?,
|
||||
isContribute: json['is_contribute'] as int?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
20
lib/models_new/fav/fav_pgc/publish.dart
Normal file
20
lib/models_new/fav/fav_pgc/publish.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class Publish {
|
||||
String? pubTime;
|
||||
String? pubTimeShow;
|
||||
String? releaseDate;
|
||||
String? releaseDateShow;
|
||||
|
||||
Publish({
|
||||
this.pubTime,
|
||||
this.pubTimeShow,
|
||||
this.releaseDate,
|
||||
this.releaseDateShow,
|
||||
});
|
||||
|
||||
factory Publish.fromJson(Map<String, dynamic> json) => Publish(
|
||||
pubTime: json['pub_time'] as String?,
|
||||
pubTimeShow: json['pub_time_show'] as String?,
|
||||
releaseDate: json['release_date'] as String?,
|
||||
releaseDateShow: json['release_date_show'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_pgc/rating.dart
Normal file
11
lib/models_new/fav/fav_pgc/rating.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Rating {
|
||||
double? score;
|
||||
int? count;
|
||||
|
||||
Rating({this.score, this.count});
|
||||
|
||||
factory Rating.fromJson(Map<String, dynamic> json) => Rating(
|
||||
score: (json['score'] as num?)?.toDouble(),
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/fav/fav_pgc/rights.dart
Normal file
23
lib/models_new/fav/fav_pgc/rights.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class Rights {
|
||||
int? allowReview;
|
||||
int? allowPreview;
|
||||
int? isSelection;
|
||||
int? selectionStyle;
|
||||
int? isRcmd;
|
||||
|
||||
Rights({
|
||||
this.allowReview,
|
||||
this.allowPreview,
|
||||
this.isSelection,
|
||||
this.selectionStyle,
|
||||
this.isRcmd,
|
||||
});
|
||||
|
||||
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
|
||||
allowReview: json['allow_review'] as int?,
|
||||
allowPreview: json['allow_preview'] as int?,
|
||||
isSelection: json['is_selection'] as int?,
|
||||
selectionStyle: json['selection_style'] as int?,
|
||||
isRcmd: json['is_rcmd'] as int?,
|
||||
);
|
||||
}
|
||||
29
lib/models_new/fav/fav_pgc/section.dart
Normal file
29
lib/models_new/fav/fav_pgc/section.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
class Section {
|
||||
int? sectionId;
|
||||
int? seasonId;
|
||||
int? limitGroup;
|
||||
int? watchPlatform;
|
||||
String? copyright;
|
||||
int? banAreaShow;
|
||||
List<int>? episodeIds;
|
||||
|
||||
Section({
|
||||
this.sectionId,
|
||||
this.seasonId,
|
||||
this.limitGroup,
|
||||
this.watchPlatform,
|
||||
this.copyright,
|
||||
this.banAreaShow,
|
||||
this.episodeIds,
|
||||
});
|
||||
|
||||
factory Section.fromJson(Map<String, dynamic> json) => Section(
|
||||
sectionId: json['section_id'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
limitGroup: json['limit_group'] as int?,
|
||||
watchPlatform: json['watch_platform'] as int?,
|
||||
copyright: json['copyright'] as String?,
|
||||
banAreaShow: json['ban_area_show'] as int?,
|
||||
episodeIds: (json['episode_ids'] as List?)?.cast(),
|
||||
);
|
||||
}
|
||||
23
lib/models_new/fav/fav_pgc/series.dart
Normal file
23
lib/models_new/fav/fav_pgc/series.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class Series {
|
||||
int? seriesId;
|
||||
String? title;
|
||||
int? seasonCount;
|
||||
int? newSeasonId;
|
||||
int? seriesOrd;
|
||||
|
||||
Series({
|
||||
this.seriesId,
|
||||
this.title,
|
||||
this.seasonCount,
|
||||
this.newSeasonId,
|
||||
this.seriesOrd,
|
||||
});
|
||||
|
||||
factory Series.fromJson(Map<String, dynamic> json) => Series(
|
||||
seriesId: json['series_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
seasonCount: json['season_count'] as int?,
|
||||
newSeasonId: json['new_season_id'] as int?,
|
||||
seriesOrd: json['series_ord'] as int?,
|
||||
);
|
||||
}
|
||||
35
lib/models_new/fav/fav_pgc/stat.dart
Normal file
35
lib/models_new/fav/fav_pgc/stat.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
class Stat {
|
||||
int? follow;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
int? coin;
|
||||
int? seriesFollow;
|
||||
int? seriesView;
|
||||
int? likes;
|
||||
int? favorite;
|
||||
|
||||
Stat({
|
||||
this.follow,
|
||||
this.view,
|
||||
this.danmaku,
|
||||
this.reply,
|
||||
this.coin,
|
||||
this.seriesFollow,
|
||||
this.seriesView,
|
||||
this.likes,
|
||||
this.favorite,
|
||||
});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
follow: json['follow'] as int?,
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
seriesFollow: json['series_follow'] as int?,
|
||||
seriesView: json['series_view'] as int?,
|
||||
likes: json['likes'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
);
|
||||
}
|
||||
27
lib/models_new/fav/fav_pgc/vip_or_pay.dart
Normal file
27
lib/models_new/fav/fav_pgc/vip_or_pay.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class VipOrPay {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
VipOrPay({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory VipOrPay.fromJson(Map<String, dynamic> json) => VipOrPay(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/fav/fav_topic/data.dart
Normal file
13
lib/models_new/fav/fav_topic/data.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/fav/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>),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/fav/fav_topic/page_info.dart
Normal file
11
lib/models_new/fav/fav_topic/page_info.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
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?,
|
||||
);
|
||||
}
|
||||
29
lib/models_new/fav/fav_topic/topic_item.dart
Normal file
29
lib/models_new/fav/fav_topic/topic_item.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
class FavTopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? jumpUrl;
|
||||
String? statDesc;
|
||||
bool? showInteractData;
|
||||
|
||||
FavTopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.jumpUrl,
|
||||
this.statDesc,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory FavTopicItem.fromJson(Map<String, dynamic> json) => FavTopicItem(
|
||||
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?,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/fav/fav_topic/topic_list.dart
Normal file
18
lib/models_new/fav/fav_topic/topic_list.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_topic/page_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_topic/topic_item.dart';
|
||||
|
||||
class TopicList {
|
||||
List<FavTopicItem>? 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) => FavTopicItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
17
lib/models_new/fav/fav_video/data.dart
Normal file
17
lib/models_new/fav/fav_video/data.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/list.dart';
|
||||
|
||||
class FavVideoData {
|
||||
int? count;
|
||||
List<FavVideoItemModel>? list;
|
||||
bool? hasMore;
|
||||
|
||||
FavVideoData({this.count, this.list, this.hasMore});
|
||||
|
||||
factory FavVideoData.fromJson(Map<String, dynamic> json) => FavVideoData(
|
||||
count: json['count'] as int?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FavVideoItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
);
|
||||
}
|
||||
82
lib/models_new/fav/fav_video/list.dart
Normal file
82
lib/models_new/fav/fav_video/list.dart
Normal file
@@ -0,0 +1,82 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/upper.dart';
|
||||
|
||||
class FavVideoItemModel {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? attrDesc;
|
||||
String? title;
|
||||
String? cover;
|
||||
Upper? upper;
|
||||
int? coverType;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? mediaCount;
|
||||
int? viewCount;
|
||||
int? vt;
|
||||
bool? isTop;
|
||||
dynamic recentFav;
|
||||
int? playSwitch;
|
||||
int? type;
|
||||
String? link;
|
||||
String? bvid;
|
||||
|
||||
FavVideoItemModel({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.attrDesc,
|
||||
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.isTop,
|
||||
this.recentFav,
|
||||
this.playSwitch,
|
||||
this.type,
|
||||
this.link,
|
||||
this.bvid,
|
||||
});
|
||||
|
||||
factory FavVideoItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavVideoItemModel(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
attrDesc: json['attr_desc'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
viewCount: json['view_count'] as int?,
|
||||
vt: json['vt'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
recentFav: json['recent_fav'] as dynamic,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
type: json['type'] as int?,
|
||||
link: json['link'] as String?,
|
||||
bvid: json['bvid'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/fav/fav_video/upper.dart
Normal file
15
lib/models_new/fav/fav_video/upper.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class Upper {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
String? jumpLink;
|
||||
|
||||
Upper({this.mid, this.name, this.face, this.jumpLink});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
jumpLink: json['jump_link'] as String?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/follow/data.dart
Normal file
17
lib/models_new/follow/data.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/follow/list.dart';
|
||||
|
||||
class FollowData {
|
||||
List<FollowItemModel>? list;
|
||||
int? reVersion;
|
||||
int? total;
|
||||
|
||||
FollowData({this.list, this.reVersion, this.total});
|
||||
|
||||
factory FollowData.fromJson(Map<String, dynamic> json) => FollowData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FollowItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
reVersion: json['re_version'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
61
lib/models_new/follow/list.dart
Normal file
61
lib/models_new/follow/list.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FollowItemModel {
|
||||
int? mid;
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? faceNft;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
String? nftIcon;
|
||||
String? recReason;
|
||||
String? trackId;
|
||||
String? followTime;
|
||||
|
||||
FollowItemModel({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.faceNft,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.nftIcon,
|
||||
this.recReason,
|
||||
this.trackId,
|
||||
this.followTime,
|
||||
});
|
||||
|
||||
factory FollowItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FollowItemModel(
|
||||
mid: json['mid'] as int?,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
special: json['special'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
faceNft: json['face_nft'] as int?,
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
nftIcon: json['nft_icon'] as String?,
|
||||
recReason: json['rec_reason'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
followTime: json['follow_time'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/history/cursor.dart
Normal file
15
lib/models_new/history/cursor.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class Cursor {
|
||||
int? max;
|
||||
int? viewAt;
|
||||
String? business;
|
||||
int? ps;
|
||||
|
||||
Cursor({this.max, this.viewAt, this.business, this.ps});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
max: json['max'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
business: json['business'] as String?,
|
||||
ps: json['ps'] as int?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/history/data.dart
Normal file
23
lib/models_new/history/data.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:PiliPlus/models_new/history/cursor.dart';
|
||||
import 'package:PiliPlus/models_new/history/list.dart';
|
||||
import 'package:PiliPlus/models_new/history/tab.dart';
|
||||
|
||||
class HistoryData {
|
||||
Cursor? cursor;
|
||||
List<HistoryTab>? tab;
|
||||
List<HistoryItemModel>? list;
|
||||
|
||||
HistoryData({this.cursor, this.tab, this.list});
|
||||
|
||||
factory HistoryData.fromJson(Map<String, dynamic> json) => HistoryData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
tab: (json['tab'] as List<dynamic>?)
|
||||
?.map((e) => HistoryTab.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => HistoryItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
32
lib/models_new/history/history.dart
Normal file
32
lib/models_new/history/history.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class History {
|
||||
int? oid;
|
||||
int? epid;
|
||||
String? bvid;
|
||||
int? page;
|
||||
int? cid;
|
||||
String? part;
|
||||
String? business;
|
||||
int? dt;
|
||||
|
||||
History({
|
||||
this.oid,
|
||||
this.epid,
|
||||
this.bvid,
|
||||
this.page,
|
||||
this.cid,
|
||||
this.part,
|
||||
this.business,
|
||||
this.dt,
|
||||
});
|
||||
|
||||
factory History.fromJson(Map<String, dynamic> json) => History(
|
||||
oid: json['oid'],
|
||||
epid: json['epid'],
|
||||
bvid: json['bvid'],
|
||||
page: json['page'],
|
||||
cid: json['cid'] == 0 ? null : json['cid'],
|
||||
part: json['part'],
|
||||
business: json['business'],
|
||||
dt: json['dt'],
|
||||
);
|
||||
}
|
||||
83
lib/models_new/history/list.dart
Normal file
83
lib/models_new/history/list.dart
Normal file
@@ -0,0 +1,83 @@
|
||||
import 'package:PiliPlus/models_new/history/history.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class HistoryItemModel with MultiSelectData {
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
List<String>? 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;
|
||||
|
||||
HistoryItemModel({
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.cover,
|
||||
this.covers,
|
||||
this.uri,
|
||||
required this.history,
|
||||
this.videos,
|
||||
this.authorName,
|
||||
this.authorFace,
|
||||
this.authorMid,
|
||||
this.viewAt,
|
||||
this.progress,
|
||||
this.badge,
|
||||
this.showTitle,
|
||||
this.duration,
|
||||
this.current,
|
||||
this.total,
|
||||
this.newDesc,
|
||||
this.isFinish,
|
||||
this.isFav,
|
||||
this.kid,
|
||||
this.tagName,
|
||||
this.liveStatus,
|
||||
});
|
||||
|
||||
factory HistoryItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
HistoryItemModel(
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
covers: (json['covers'] as List?)?.cast(),
|
||||
uri: json['uri'] as String?,
|
||||
history: json['history'] == null
|
||||
? History()
|
||||
: History.fromJson(json['history'] as Map<String, dynamic>),
|
||||
videos: json['videos'] as int?,
|
||||
authorName: json['author_name'] as String?,
|
||||
authorFace: json['author_face'] as String?,
|
||||
authorMid: json['author_mid'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
progress: json['progress'] as int?,
|
||||
badge: json['badge'] as String?,
|
||||
showTitle: json['show_title'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
current: json['current'] as String?,
|
||||
total: json['total'] as int?,
|
||||
newDesc: json['new_desc'] as String?,
|
||||
isFinish: json['is_finish'] as int?,
|
||||
isFav: json['is_fav'] as int?,
|
||||
kid: json['kid'] as int?,
|
||||
tagName: json['tag_name'] as String?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/history/tab.dart
Normal file
11
lib/models_new/history/tab.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class HistoryTab {
|
||||
String? type;
|
||||
String? name;
|
||||
|
||||
HistoryTab({this.type, this.name});
|
||||
|
||||
factory HistoryTab.fromJson(Map<String, dynamic> json) => HistoryTab(
|
||||
type: json['type'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
48
lib/models_new/live/live_area_list/area_item.dart
Normal file
48
lib/models_new/live/live_area_list/area_item.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
class AreaItem {
|
||||
dynamic id;
|
||||
String? name;
|
||||
String? link;
|
||||
String? pic;
|
||||
dynamic parentId;
|
||||
String? parentName;
|
||||
int? areaType;
|
||||
int? tagType;
|
||||
|
||||
bool? isFav;
|
||||
|
||||
AreaItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.link,
|
||||
this.pic,
|
||||
this.parentId,
|
||||
this.parentName,
|
||||
this.areaType,
|
||||
this.tagType,
|
||||
});
|
||||
|
||||
factory AreaItem.fromJson(Map<String, dynamic> json) => AreaItem(
|
||||
id: json['id'],
|
||||
name: json['name'] as String?,
|
||||
link: json['link'] as String?,
|
||||
pic: json['pic'] as String?,
|
||||
parentId: json['parent_id'],
|
||||
parentName: json['parent_name'] as String?,
|
||||
areaType: json['area_type'] as int?,
|
||||
tagType: json['tag_type'] as int?,
|
||||
);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (other is AreaItem) {
|
||||
return id == other.id && parentId == other.parentId;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, parentId);
|
||||
}
|
||||
19
lib/models_new/live/live_area_list/area_list.dart
Normal file
19
lib/models_new/live/live_area_list/area_list.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
||||
|
||||
class AreaList {
|
||||
int? id;
|
||||
String? name;
|
||||
int? parentAreaType;
|
||||
List<AreaItem>? areaList;
|
||||
|
||||
AreaList({this.id, this.name, this.parentAreaType, this.areaList});
|
||||
|
||||
factory AreaList.fromJson(Map<String, dynamic> json) => AreaList(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] ?? '',
|
||||
parentAreaType: json['parent_area_type'] as int?,
|
||||
areaList: (json['area_list'] as List<dynamic>?)
|
||||
?.map((e) => AreaItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
33
lib/models_new/live/live_dm_info/data.dart
Normal file
33
lib/models_new/live/live_dm_info/data.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/live/live_dm_info/host_list.dart';
|
||||
|
||||
class LiveDmInfoData {
|
||||
String? group;
|
||||
int? businessId;
|
||||
double? refreshRowFactor;
|
||||
int? refreshRate;
|
||||
int? maxDelay;
|
||||
String? token;
|
||||
List<HostList>? hostList;
|
||||
|
||||
LiveDmInfoData({
|
||||
this.group,
|
||||
this.businessId,
|
||||
this.refreshRowFactor,
|
||||
this.refreshRate,
|
||||
this.maxDelay,
|
||||
this.token,
|
||||
this.hostList,
|
||||
});
|
||||
|
||||
factory LiveDmInfoData.fromJson(Map<String, dynamic> json) => LiveDmInfoData(
|
||||
group: json['group'] as String?,
|
||||
businessId: json['business_id'] as int?,
|
||||
refreshRowFactor: (json['refresh_row_factor'] as num?)?.toDouble(),
|
||||
refreshRate: json['refresh_rate'] as int?,
|
||||
maxDelay: json['max_delay'] as int?,
|
||||
token: json['token'] as String?,
|
||||
hostList: (json['host_list'] as List<dynamic>?)
|
||||
?.map((e) => HostList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/live/live_dm_info/host_list.dart
Normal file
15
lib/models_new/live/live_dm_info/host_list.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class HostList {
|
||||
String? host;
|
||||
int? port;
|
||||
int? wssPort;
|
||||
int? wsPort;
|
||||
|
||||
HostList({this.host, this.port, this.wssPort, this.wsPort});
|
||||
|
||||
factory HostList.fromJson(Map<String, dynamic> json) => HostList(
|
||||
host: json['host'] as String?,
|
||||
port: json['port'] as int?,
|
||||
wssPort: json['wss_port'] as int?,
|
||||
wsPort: json['ws_port'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_emote/data.dart
Normal file
13
lib/models_new/live/live_emote/data.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/live/live_emote/datum.dart';
|
||||
|
||||
class LiveEmoteData {
|
||||
List<LiveEmoteDatum>? data;
|
||||
|
||||
LiveEmoteData({this.data});
|
||||
|
||||
factory LiveEmoteData.fromJson(Map<String, dynamic> json) => LiveEmoteData(
|
||||
data: (json['data'] as List<dynamic>?)
|
||||
?.map((e) => LiveEmoteDatum.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
21
lib/models_new/live/live_emote/datum.dart
Normal file
21
lib/models_new/live/live_emote/datum.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/live/live_emote/emoticon.dart';
|
||||
|
||||
class LiveEmoteDatum {
|
||||
List<Emoticon>? emoticons;
|
||||
int? pkgType;
|
||||
String? currentCover;
|
||||
|
||||
LiveEmoteDatum({
|
||||
this.emoticons,
|
||||
this.pkgType,
|
||||
this.currentCover,
|
||||
});
|
||||
|
||||
factory LiveEmoteDatum.fromJson(Map<String, dynamic> json) => LiveEmoteDatum(
|
||||
emoticons: (json['emoticons'] as List<dynamic>?)
|
||||
?.map((e) => Emoticon.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pkgType: json['pkg_type'] as int?,
|
||||
currentCover: json['current_cover'] as String?,
|
||||
);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user