diff --git a/lib/http/user.dart b/lib/http/user.dart index d8d76743a..626a5c547 100644 --- a/lib/http/user.dart +++ b/lib/http/user.dart @@ -431,7 +431,9 @@ abstract final class UserHttp { } } - static Future> spaceSettingMod(Map data) async { + static Future> spaceSettingMod( + Map data, + ) async { final res = await Request().post( Api.spaceSettingMod, queryParameters: { diff --git a/lib/models_new/account_myinfo/data.dart b/lib/models_new/account_myinfo/data.dart index 557338548..6e5a77a81 100644 --- a/lib/models_new/account_myinfo/data.dart +++ b/lib/models_new/account_myinfo/data.dart @@ -5,19 +5,7 @@ class AccountMyInfoData { num? 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, @@ -26,19 +14,7 @@ class AccountMyInfoData { 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 json) => @@ -49,18 +25,6 @@ class AccountMyInfoData { coins: json['coins'] as num?, 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?, ); } diff --git a/lib/models_new/article/article_info/data.dart b/lib/models_new/article/article_info/data.dart index 5f74a4b76..232a7b028 100644 --- a/lib/models_new/article/article_info/data.dart +++ b/lib/models_new/article/article_info/data.dart @@ -1,86 +1,26 @@ -import 'package:PiliPlus/models_new/article/article_info/share_channel.dart'; import 'package:PiliPlus/models_new/article/article_info/stats.dart'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class ArticleInfoData { - int? like; - bool? attention; bool? favorite; - num? coin; Stats? stats; String? title; - String? bannerUrl; - int? mid; - String? authorName; - bool? isAuthor; - List? imageUrls; List? originImageUrls; - bool? shareable; - bool? showLaterWatch; - bool? showSmallWindow; - bool? inList; - int? pre; - int? next; - List? 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 json) => ArticleInfoData( - like: json['like'] as int?, - attention: json['attention'] as bool?, favorite: json['favorite'] as bool?, - coin: json['coin'] as num?, stats: json['stats'] == null ? null : Stats.fromJson(json['stats'] as Map), 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?)?.fromCast(), originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(), - 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?) - ?.map((e) => ShareChannel.fromJson(e as Map)) - .toList(), - type: json['type'] as int?, - videoUrl: json['video_url'] as String?, - location: json['location'] as String?, - disableShare: json['disable_share'] as bool?, ); } diff --git a/lib/models_new/article/article_info/share_channel.dart b/lib/models_new/article/article_info/share_channel.dart deleted file mode 100644 index 5eb5eab04..000000000 --- a/lib/models_new/article/article_info/share_channel.dart +++ /dev/null @@ -1,13 +0,0 @@ -class ShareChannel { - String? name; - String? picture; - String? shareChannel; - - ShareChannel({this.name, this.picture, this.shareChannel}); - - factory ShareChannel.fromJson(Map json) => ShareChannel( - name: json['name'] as String?, - picture: json['picture'] as String?, - shareChannel: json['share_channel'] as String?, - ); -} diff --git a/lib/models_new/article/article_info/stats.dart b/lib/models_new/article/article_info/stats.dart index 590b8c79a..5a00717a3 100644 --- a/lib/models_new/article/article_info/stats.dart +++ b/lib/models_new/article/article_info/stats.dart @@ -1,32 +1,20 @@ class Stats { - int? view; int? favorite; int? like; - int? dislike; int? reply; int? share; - num? coin; - int? dynam1c; Stats({ - this.view, this.favorite, this.like, - this.dislike, this.reply, this.share, - this.coin, - this.dynam1c, }); factory Stats.fromJson(Map 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 num?, - dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/article/article_list/article.dart b/lib/models_new/article/article_list/article.dart index 7767a3c6d..e50777222 100644 --- a/lib/models_new/article/article_list/article.dart +++ b/lib/models_new/article/article_list/article.dart @@ -1,67 +1,32 @@ -import 'package:PiliPlus/models_new/article/article_list/category.dart'; import 'package:PiliPlus/models_new/article/article_list/stats.dart'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class ArticleListItemModel { int? id; String? title; - int? state; - int? publishTime; - int? words; List? imageUrls; - Category? category; - List? 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 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?)?.fromCast(), - category: json['category'] == null - ? null - : Category.fromJson(json['category'] as Map), - categories: (json['categories'] as List?) - ?.map((e) => Category.fromJson(e as Map)) - .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), - likeState: json['like_state'] as int?, ); } diff --git a/lib/models_new/article/article_list/category.dart b/lib/models_new/article/article_list/category.dart deleted file mode 100644 index 7b202e701..000000000 --- a/lib/models_new/article/article_list/category.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Category { - int? id; - int? parentId; - String? name; - - Category({this.id, this.parentId, this.name}); - - factory Category.fromJson(Map json) => Category( - id: json['id'] as int?, - parentId: json['parent_id'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/article/article_list/data.dart b/lib/models_new/article/article_list/data.dart index a9435b52f..5fd09fb14 100644 --- a/lib/models_new/article/article_list/data.dart +++ b/lib/models_new/article/article_list/data.dart @@ -1,21 +1,16 @@ 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? articles; Owner? author; - Last? last; - bool? attention; ArticleListData({ this.list, this.articles, this.author, - this.last, - this.attention, }); factory ArticleListData.fromJson(Map json) => @@ -31,9 +26,5 @@ class ArticleListData { author: json['author'] == null ? null : Owner.fromJson(json['author'] as Map), - last: json['last'] == null - ? null - : Last.fromJson(json['last'] as Map), - attention: json['attention'] as bool?, ); } diff --git a/lib/models_new/article/article_list/label.dart b/lib/models_new/article/article_list/label.dart deleted file mode 100644 index 638ea14b2..000000000 --- a/lib/models_new/article/article_list/label.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Label { - String? path; - String? text; - String? labelTheme; - - Label({this.path, this.text, this.labelTheme}); - - factory Label.fromJson(Map json) => Label( - path: json['path'] as String?, - text: json['text'] as String?, - labelTheme: json['label_theme'] as String?, - ); -} diff --git a/lib/models_new/article/article_list/last.dart b/lib/models_new/article/article_list/last.dart deleted file mode 100644 index ae283f843..000000000 --- a/lib/models_new/article/article_list/last.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:PiliPlus/models_new/article/article_list/category.dart'; -import 'package:PiliPlus/utils/extension/iterable_ext.dart'; - -class Last { - int? id; - String? title; - int? state; - int? publishTime; - int? words; - List? 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 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?)?.fromCast(), - category: json['category'] == null - ? null - : Category.fromJson(json['category'] as Map), - 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?, - ); -} diff --git a/lib/models_new/article/article_list/list.dart b/lib/models_new/article/article_list/list.dart index 3c349e1b2..069fd1b81 100644 --- a/lib/models_new/article/article_list/list.dart +++ b/lib/models_new/article/article_list/list.dart @@ -1,54 +1,30 @@ 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 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?, ); } diff --git a/lib/models_new/article/article_list/stats.dart b/lib/models_new/article/article_list/stats.dart index 590b8c79a..81f6cf6e3 100644 --- a/lib/models_new/article/article_list/stats.dart +++ b/lib/models_new/article/article_list/stats.dart @@ -1,32 +1,17 @@ class Stats { int? view; - int? favorite; int? like; - int? dislike; int? reply; - int? share; - num? coin; - int? dynam1c; Stats({ this.view, - this.favorite, this.like, - this.dislike, this.reply, - this.share, - this.coin, - this.dynam1c, }); factory Stats.fromJson(Map 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 num?, - dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/article/article_view/category.dart b/lib/models_new/article/article_view/category.dart deleted file mode 100644 index 7b202e701..000000000 --- a/lib/models_new/article/article_view/category.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Category { - int? id; - int? parentId; - String? name; - - Category({this.id, this.parentId, this.name}); - - factory Category.fromJson(Map json) => Category( - id: json['id'] as int?, - parentId: json['parent_id'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/article/article_view/data.dart b/lib/models_new/article/article_view/data.dart index 29d8e90e9..e5586f627 100644 --- a/lib/models_new/article/article_view/data.dart +++ b/lib/models_new/article/article_view/data.dart @@ -1,95 +1,28 @@ 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'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class ArticleViewData { int? id; - Category? category; - List? categories; String? title; - String? summary; - String? bannerUrl; - int? templateId; - int? state; Avatar? author; - int? reprint; - List? imageUrls; int? publishTime; - int? ctime; - int? mtime; - Stats? stats; - List? tags; - int? words; List? 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? 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, }); @@ -97,56 +30,14 @@ class ArticleViewData { factory ArticleViewData.fromJson(Map json) => ArticleViewData( id: json['id'] as int?, - category: json['category'] == null - ? null - : Category.fromJson(json['category'] as Map), - categories: (json['categories'] as List?) - ?.map((e) => Category.fromJson(e as Map)) - .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), - reprint: json['reprint'] as int?, - imageUrls: (json['image_urls'] as List?)?.fromCast(), 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), - tags: (json['tags'] as List?) - ?.map((e) => Tag.fromJson(e as Map)) - .toList(), - words: json['words'] as int?, originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(), - list: json['list'] as dynamic, - isLike: json['is_like'] as bool?, - media: json['media'] == null - ? null - : Media.fromJson(json['media'] as Map), - 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), diff --git a/lib/models_new/article/article_view/label.dart b/lib/models_new/article/article_view/label.dart deleted file mode 100644 index 638ea14b2..000000000 --- a/lib/models_new/article/article_view/label.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Label { - String? path; - String? text; - String? labelTheme; - - Label({this.path, this.text, this.labelTheme}); - - factory Label.fromJson(Map json) => Label( - path: json['path'] as String?, - text: json['text'] as String?, - labelTheme: json['label_theme'] as String?, - ); -} diff --git a/lib/models_new/article/article_view/media.dart b/lib/models_new/article/article_view/media.dart deleted file mode 100644 index 83c707baf..000000000 --- a/lib/models_new/article/article_view/media.dart +++ /dev/null @@ -1,35 +0,0 @@ -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 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?, - ); -} diff --git a/lib/models_new/article/article_view/opus.dart b/lib/models_new/article/article_view/opus.dart index cc1cbaf56..5ad695bcd 100644 --- a/lib/models_new/article/article_view/opus.dart +++ b/lib/models_new/article/article_view/opus.dart @@ -1,15 +1,9 @@ import 'package:PiliPlus/models/dynamics/article_content_model.dart'; class ArticleOpus { - int? opusid; - int? opussource; - String? title; List? content; ArticleOpus.fromJson(Map json) { - opusid = json['opus_id']; - opussource = json['opus_source']; - title = json['title']; if (json['content']?['paragraphs'] case List list) { content = list.map((i) => ArticleContentModel.fromJson(i)).toList(); } diff --git a/lib/models_new/article/article_view/stats.dart b/lib/models_new/article/article_view/stats.dart deleted file mode 100644 index 590b8c79a..000000000 --- a/lib/models_new/article/article_view/stats.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Stats { - int? view; - int? favorite; - int? like; - int? dislike; - int? reply; - int? share; - num? coin; - int? dynam1c; - - Stats({ - this.view, - this.favorite, - this.like, - this.dislike, - this.reply, - this.share, - this.coin, - this.dynam1c, - }); - - factory Stats.fromJson(Map 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 num?, - dynam1c: json['dynamic'] as int?, - ); -} diff --git a/lib/models_new/article/article_view/tag.dart b/lib/models_new/article/article_view/tag.dart deleted file mode 100644 index 33fe70325..000000000 --- a/lib/models_new/article/article_view/tag.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Tag { - int? tid; - String? name; - - Tag({this.tid, this.name}); - - factory Tag.fromJson(Map json) => Tag( - tid: json['tid'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/blacklist/data.dart b/lib/models_new/blacklist/data.dart index 7741df5b5..1cf97c780 100644 --- a/lib/models_new/blacklist/data.dart +++ b/lib/models_new/blacklist/data.dart @@ -2,16 +2,14 @@ import 'package:PiliPlus/models_new/blacklist/list.dart'; class BlackListData { List? list; - int? reVersion; int? total; - BlackListData({this.list, this.reVersion, this.total}); + BlackListData({this.list, this.total}); factory BlackListData.fromJson(Map json) => BlackListData( list: (json['list'] as List?) ?.map((e) => BlackListItem.fromJson(e as Map)) .toList(), - reVersion: json['re_version'] as int?, total: json['total'] as int?, ); } diff --git a/lib/models_new/blacklist/list.dart b/lib/models_new/blacklist/list.dart index edbd86a1c..ff54766a6 100644 --- a/lib/models_new/blacklist/list.dart +++ b/lib/models_new/blacklist/list.dart @@ -1,61 +1,20 @@ -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 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, - ), - vip: json['vip'] == null - ? null - : Vip.fromJson(json['vip'] as Map), - nftIcon: json['nft_icon'] as String?, - recReason: json['rec_reason'] as String?, - trackId: json['track_id'] as String?, - followTime: json['follow_time'] as String?, ); } diff --git a/lib/models_new/coin_log/data.dart b/lib/models_new/coin_log/data.dart index bba031664..dff395016 100644 --- a/lib/models_new/coin_log/data.dart +++ b/lib/models_new/coin_log/data.dart @@ -1,15 +1,13 @@ import 'package:PiliPlus/models_new/coin_log/list.dart'; class CoinLogData { - List? list; - int? count; + CoinLogData({this.list}); - CoinLogData({this.list, this.count}); + List? list; factory CoinLogData.fromJson(Map json) => CoinLogData( list: (json['list'] as List?) ?.map((e) => CoinLogItem.fromJson(e as Map)) .toList(), - count: json['count'] as int?, ); } diff --git a/lib/models_new/coin_log/list.dart b/lib/models_new/coin_log/list.dart index 6e9b291a7..030b6f695 100644 --- a/lib/models_new/coin_log/list.dart +++ b/lib/models_new/coin_log/list.dart @@ -1,14 +1,14 @@ class CoinLogItem { - final String time; - final String delta; - final String reason; - const CoinLogItem({ required this.time, required this.delta, required this.reason, }); + final String time; + final String delta; + final String reason; + factory CoinLogItem.fromJson(Map json) => CoinLogItem( time: json['time'], delta: (json['delta'] as num).toString(), diff --git a/lib/models_new/danmaku/post.dart b/lib/models_new/danmaku/post.dart index 678934aa3..6f9bb3c1c 100644 --- a/lib/models_new/danmaku/post.dart +++ b/lib/models_new/danmaku/post.dart @@ -1,31 +1,13 @@ class DanmakuPost { DanmakuPost({ - required this.action, - required this.animation, - required this.colorfulSrc, - required this.dmContent, required this.dmid, - required this.dmidStr, - required this.visible, }); - final String? action; - final String? animation; - final dynamic colorfulSrc; - final String? dmContent; final int? dmid; - final String? dmidStr; - final bool? visible; factory DanmakuPost.fromJson(Map json) { return DanmakuPost( - action: json["action"], - animation: json["animation"], - colorfulSrc: json["colorful_src"], - dmContent: json["dm_content"], dmid: json["dmid"], - dmidStr: json["dmid_str"], - visible: json["visible"], ); } } diff --git a/lib/models_new/dynamic/dyn_mention/group.dart b/lib/models_new/dynamic/dyn_mention/group.dart index 711309a5f..6d82649ed 100644 --- a/lib/models_new/dynamic/dyn_mention/group.dart +++ b/lib/models_new/dynamic/dyn_mention/group.dart @@ -2,14 +2,12 @@ import 'package:PiliPlus/models_new/dynamic/dyn_mention/item.dart'; class MentionGroup { String? groupName; - int? groupType; List? items; - MentionGroup({this.groupName, this.groupType, this.items}); + MentionGroup({this.groupName, this.items}); factory MentionGroup.fromJson(Map json) => MentionGroup( groupName: json['group_name'] as String?, - groupType: json['group_type'] as int?, items: (json['items'] as List?) ?.map((e) => MentionItem.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/dynamic/dyn_mention/item.dart b/lib/models_new/dynamic/dyn_mention/item.dart index 7d3572f4e..c5207a66c 100644 --- a/lib/models_new/dynamic/dyn_mention/item.dart +++ b/lib/models_new/dynamic/dyn_mention/item.dart @@ -4,14 +4,12 @@ class MentionItem with MultiSelectData { final String? face; final int? fans; final String? name; - final int? officialVerifyType; final String? uid; MentionItem({ this.face, this.fans, this.name, - this.officialVerifyType, this.uid, }); @@ -19,7 +17,6 @@ class MentionItem with MultiSelectData { face: json['face'] as String?, fans: json['fans'] as int?, name: json['name'] as String?, - officialVerifyType: json['official_verify_type'] as int?, uid: json['uid'] as String?, ); diff --git a/lib/models_new/dynamic/dyn_reserve/data.dart b/lib/models_new/dynamic/dyn_reserve/data.dart index fd82f6380..340181151 100644 --- a/lib/models_new/dynamic/dyn_reserve/data.dart +++ b/lib/models_new/dynamic/dyn_reserve/data.dart @@ -1,23 +1,17 @@ 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 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?, ); } diff --git a/lib/models_new/dynamic/dyn_reserve_info/data.dart b/lib/models_new/dynamic/dyn_reserve_info/data.dart index 363c72054..ad58d70b6 100644 --- a/lib/models_new/dynamic/dyn_reserve_info/data.dart +++ b/lib/models_new/dynamic/dyn_reserve_info/data.dart @@ -1,48 +1,18 @@ class ReserveInfoData { int? id; String? title; - int? stime; - int? etime; - int? type; int? livePlanStartTime; - int? lotteryType; - String? lotteryId; - int? subType; ReserveInfoData({ this.id, this.title, - this.stime, - this.etime, - this.type, this.livePlanStartTime, - this.lotteryType, - this.lotteryId, - this.subType, }); factory ReserveInfoData.fromJson(Map json) => ReserveInfoData( id: json['id'] as int?, title: json['title'] as String?, - stime: json['stime'] as int?, - etime: json['etime'] as int?, - type: json['type'] as int?, livePlanStartTime: json['live_plan_start_time'] as int?, - lotteryType: json['lottery_type'] as int?, - lotteryId: json['lottery_id'] as String?, - subType: json['sub_type'] as int?, ); - - Map toJson() => { - 'id': id, - 'title': title, - 'stime': stime, - 'etime': etime, - 'type': type, - 'live_plan_start_time': livePlanStartTime, - 'lottery_type': lotteryType, - 'lottery_id': lotteryId, - 'sub_type': subType, - }; } diff --git a/lib/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart b/lib/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart index bd0a74794..407413e1d 100644 --- a/lib/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart +++ b/lib/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart @@ -2,17 +2,15 @@ import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/all_sort_by.dart'; class TopicSortByConf { List? allSortBy; - int? defaultSortBy; int? showSortBy; - TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy}); + TopicSortByConf({this.allSortBy, this.showSortBy}); factory TopicSortByConf.fromJson(Map json) { return TopicSortByConf( allSortBy: (json['all_sort_by'] as List?) ?.map((e) => AllSortBy.fromJson(e as Map)) .toList(), - defaultSortBy: json['default_sort_by'] as int?, showSortBy: json['show_sort_by'] as int?, ); } diff --git a/lib/models_new/dynamic/dyn_topic_pub_search/data.dart b/lib/models_new/dynamic/dyn_topic_pub_search/data.dart index ca05cb7e3..73c2a5931 100644 --- a/lib/models_new/dynamic/dyn_topic_pub_search/data.dart +++ b/lib/models_new/dynamic/dyn_topic_pub_search/data.dart @@ -1,32 +1,20 @@ -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_top/topic_item.dart'; class TopicPubSearchData { - NewTopic? newTopic; - bool? hasCreateJurisdiction; List? topicItems; - String? requestId; PageInfo? pageInfo; TopicPubSearchData({ - this.newTopic, - this.hasCreateJurisdiction, this.topicItems, - this.requestId, this.pageInfo, }); factory TopicPubSearchData.fromJson(Map json) => TopicPubSearchData( - newTopic: json['new_topic'] == null - ? null - : NewTopic.fromJson(json['new_topic'] as Map), - hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?, topicItems: (json['topic_items'] as List?) ?.map((e) => TopicItem.fromJson(e as Map)) .toList(), - requestId: json['request_id'] as String?, pageInfo: json['page_info'] == null ? null : PageInfo.fromJson(json['page_info'] as Map), diff --git a/lib/models_new/dynamic/dyn_topic_pub_search/new_topic.dart b/lib/models_new/dynamic/dyn_topic_pub_search/new_topic.dart deleted file mode 100644 index e8c2db534..000000000 --- a/lib/models_new/dynamic/dyn_topic_pub_search/new_topic.dart +++ /dev/null @@ -1,9 +0,0 @@ -class NewTopic { - String? name; - - NewTopic({this.name}); - - factory NewTopic.fromJson(Map json) => NewTopic( - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart b/lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart index c175a7f17..61ea5daf6 100644 --- a/lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart +++ b/lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart @@ -1,11 +1,9 @@ class PageInfo { - int? offset; bool? hasMore; - PageInfo({this.offset, this.hasMore}); + PageInfo({this.hasMore}); factory PageInfo.fromJson(Map json) => PageInfo( - offset: json['offset'] as int?, hasMore: json['has_more'] as bool?, ); } diff --git a/lib/models_new/dynamic/dyn_topic_top/top_details.dart b/lib/models_new/dynamic/dyn_topic_top/top_details.dart index 2be417e3c..68d749e36 100644 --- a/lib/models_new/dynamic/dyn_topic_top/top_details.dart +++ b/lib/models_new/dynamic/dyn_topic_top/top_details.dart @@ -4,16 +4,10 @@ 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 json) => TopDetails( @@ -23,8 +17,5 @@ class TopDetails { topicCreator: json['topic_creator'] == null ? null : TopicCreator.fromJson(json['topic_creator'] as Map), - hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?, - wordColor: json['word_color'] as int?, - closePubLayerEntry: json['close_pub_layer_entry'] as bool?, ); } diff --git a/lib/models_new/dynamic/dyn_topic_top/topic_item.dart b/lib/models_new/dynamic/dyn_topic_top/topic_item.dart index 4996a13e6..d4bb93083 100644 --- a/lib/models_new/dynamic/dyn_topic_top/topic_item.dart +++ b/lib/models_new/dynamic/dyn_topic_top/topic_item.dart @@ -5,14 +5,7 @@ class TopicItem { int discuss; int fav; int like; - int? dynamics; - String? jumpUrl; - String? backColor; String? description; - String? sharePic; - String? shareUrl; - int? ctime; - bool? showInteractData; bool? isFav; bool? isLike; @@ -23,14 +16,7 @@ class TopicItem { required 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, }); @@ -42,14 +28,7 @@ class TopicItem { discuss: json['discuss'] ?? 0, fav: json['fav'] ?? 0, like: json['like'] ?? 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?, ); diff --git a/lib/models_new/fav/fav_article/author.dart b/lib/models_new/fav/fav_article/author.dart index 778aae896..997e904fc 100644 --- a/lib/models_new/fav/fav_article/author.dart +++ b/lib/models_new/fav/fav_article/author.dart @@ -1,13 +1,9 @@ class Author { String? name; - String? face; - String? mid; - Author({this.name, this.face, this.mid}); + Author({this.name}); factory Author.fromJson(Map json) => Author( name: json['name'] as String?, - face: json['face'] as String?, - mid: json['mid'] as String?, ); } diff --git a/lib/models_new/fav/fav_article/cover.dart b/lib/models_new/fav/fav_article/cover.dart index abcf6001a..6463e3786 100644 --- a/lib/models_new/fav/fav_article/cover.dart +++ b/lib/models_new/fav/fav_article/cover.dart @@ -1,13 +1,9 @@ class Cover { String? url; - int? width; - int? height; - Cover({this.url, this.width, this.height}); + Cover({this.url}); factory Cover.fromJson(Map json) => Cover( url: json['url'] as String?, - width: json['width'] as int?, - height: json['height'] as int?, ); } diff --git a/lib/models_new/fav/fav_article/data.dart b/lib/models_new/fav/fav_article/data.dart index 8f326f4ef..6342b8f11 100644 --- a/lib/models_new/fav/fav_article/data.dart +++ b/lib/models_new/fav/fav_article/data.dart @@ -3,16 +3,10 @@ import 'package:PiliPlus/models_new/fav/fav_article/item.dart'; class FavArticleData { List? items; bool? hasMore; - String? offset; - String? updateNum; - String? updateBaseline; FavArticleData({ this.items, this.hasMore, - this.offset, - this.updateNum, - this.updateBaseline, }); factory FavArticleData.fromJson(Map json) => FavArticleData( @@ -20,8 +14,5 @@ class FavArticleData { ?.map((e) => FavArticleItemModel.fromJson(e as Map)) .toList(), hasMore: json['has_more'] as bool?, - offset: json['offset'] as String?, - updateNum: json['update_num'] as String?, - updateBaseline: json['update_baseline'] as String?, ); } diff --git a/lib/models_new/fav/fav_article/item.dart b/lib/models_new/fav/fav_article/item.dart index 07b40b7a8..e3f0ca1a4 100644 --- a/lib/models_new/fav/fav_article/item.dart +++ b/lib/models_new/fav/fav_article/item.dart @@ -3,20 +3,16 @@ 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, @@ -25,10 +21,8 @@ class FavArticleItemModel { factory FavArticleItemModel.fromJson(Map 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), diff --git a/lib/models_new/fav/fav_article/stat.dart b/lib/models_new/fav/fav_article/stat.dart index e16802ff6..228afc060 100644 --- a/lib/models_new/fav/fav_article/stat.dart +++ b/lib/models_new/fav/fav_article/stat.dart @@ -1,11 +1,9 @@ class Stat { - String? view; String? like; - Stat({this.view, this.like}); + Stat({this.like}); factory Stat.fromJson(Map json) => Stat( - view: json['view'] as String?, like: json['like'] as String?, ); } diff --git a/lib/models_new/fav/fav_detail/cnt_info.dart b/lib/models_new/fav/fav_detail/cnt_info.dart index 6f390a292..e646792c9 100644 --- a/lib/models_new/fav/fav_detail/cnt_info.dart +++ b/lib/models_new/fav/fav_detail/cnt_info.dart @@ -1,41 +1,15 @@ class CntInfo { - int? collect; int? play; - int? thumbUp; - int? thumbDown; - int? share; - int? reply; int? danmaku; - num? coin; - int? vt; - int? playSwitch; - String? viewText1; CntInfo({ - this.collect, this.play, - this.thumbUp, - this.thumbDown, - this.share, - this.reply, + this.danmaku, - this.coin, - this.vt, - this.playSwitch, - this.viewText1, }); factory CntInfo.fromJson(Map json) => CntInfo( - collect: json['collect'] as int?, play: json['play'] as int?, - thumbUp: json['thumb_up'] as int?, - thumbDown: json['thumb_down'] as int?, - share: json['share'] as int?, - reply: json['reply'] as int?, danmaku: json['danmaku'] as int?, - coin: json['coin'] as num?, - vt: json['vt'] as int?, - playSwitch: json['play_switch'] as int?, - viewText1: json['view_text_1'] as String?, ); } diff --git a/lib/models_new/fav/fav_detail/data.dart b/lib/models_new/fav/fav_detail/data.dart index 53a11ab21..72d426589 100644 --- a/lib/models_new/fav/fav_detail/data.dart +++ b/lib/models_new/fav/fav_detail/data.dart @@ -5,9 +5,8 @@ class FavDetailData { FavFolderInfo? info; List? medias; bool? hasMore; - int? ttl; - FavDetailData({this.info, this.medias, this.hasMore, this.ttl}); + FavDetailData({this.info, this.medias, this.hasMore}); factory FavDetailData.fromJson(Map json) => FavDetailData( info: json['info'] == null @@ -17,6 +16,5 @@ class FavDetailData { ?.map((e) => FavDetailItemModel.fromJson(e as Map)) .toList(), hasMore: json['has_more'] as bool?, - ttl: json['ttl'] as int?, ); } diff --git a/lib/models_new/fav/fav_detail/info.dart b/lib/models_new/fav/fav_detail/info.dart deleted file mode 100644 index a6e31cc7f..000000000 --- a/lib/models_new/fav/fav_detail/info.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:PiliPlus/models/model_owner.dart'; -import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart'; - -class FavDetailInfo { - int? id; - int? fid; - int? mid; - int? attr; - String? title; - String? cover; - Owner? 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 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 - : Owner.fromJson(json['upper'] as Map), - coverType: json['cover_type'] as int?, - cntInfo: json['cnt_info'] == null - ? null - : CntInfo.fromJson(json['cnt_info'] as Map), - 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?, - ); -} diff --git a/lib/models_new/fav/fav_detail/media.dart b/lib/models_new/fav/fav_detail/media.dart index e81b6cafc..662a34e84 100644 --- a/lib/models_new/fav/fav_detail/media.dart +++ b/lib/models_new/fav/fav_detail/media.dart @@ -10,19 +10,14 @@ class FavDetailItemModel with MultiSelectData { String? title; String? cover; String? intro; - int? page; int? duration; Owner? upper; int? attr; CntInfo? cntInfo; - String? link; - int? ctime; - int? pubtime; int? favTime; String? bvid; Ogv? ogv; Ugc? ugc; - String? mediaListLink; FavDetailItemModel({ this.id, @@ -30,19 +25,14 @@ class FavDetailItemModel with MultiSelectData { 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.ogv, this.ugc, - this.mediaListLink, }); factory FavDetailItemModel.fromJson(Map json) => @@ -52,7 +42,6 @@ class FavDetailItemModel with MultiSelectData { 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 @@ -61,15 +50,11 @@ class FavDetailItemModel with MultiSelectData { cntInfo: json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info'] as Map), - link: json['link'] as String?, - ctime: json['ctime'] as int?, - pubtime: json['pubtime'] as int?, favTime: json['fav_time'] as int?, bvid: json['bvid'] ?? json['bv_id'], ogv: json['ogv'] == null ? null : Ogv.fromJson(json['ogv']), ugc: json['ugc'] == null ? null : Ugc.fromJson(json['ugc'] as Map), - mediaListLink: json['media_list_link'] as String?, ); } diff --git a/lib/models_new/fav/fav_detail/ogv.dart b/lib/models_new/fav/fav_detail/ogv.dart index a560a46ef..47ede5136 100644 --- a/lib/models_new/fav/fav_detail/ogv.dart +++ b/lib/models_new/fav/fav_detail/ogv.dart @@ -1,17 +1,14 @@ class Ogv { String? typeName; - int? typeId; int? seasonId; Ogv({ this.typeName, - this.typeId, this.seasonId, }); factory Ogv.fromJson(Map json) => Ogv( typeName: json['type_name'], - typeId: json['type_id'], seasonId: json['season_id'], ); } diff --git a/lib/models_new/fav/fav_folder/list.dart b/lib/models_new/fav/fav_folder/list.dart index 16eb9ac71..ec8e4482a 100644 --- a/lib/models_new/fav/fav_folder/list.dart +++ b/lib/models_new/fav/fav_folder/list.dart @@ -5,42 +5,24 @@ class FavFolderInfo { int? fid; int mid; int attr; - String? attrDesc; String title; String cover; Owner? upper; - int? coverType; String? intro; - int? ctime; - int? mtime; - int? state; int? favState; int mediaCount; - int? viewCount; - bool? isTop; - int? type; - String? bvid; FavFolderInfo({ this.id = 0, this.fid, this.mid = 0, this.attr = -1, - this.attrDesc, this.title = '', this.cover = '', this.upper, - this.coverType, this.intro, - this.ctime, - this.mtime, - this.state, this.favState, this.mediaCount = 0, - this.viewCount, - this.isTop, - this.type, - this.bvid, }); factory FavFolderInfo.fromJson(Map json) => FavFolderInfo( @@ -48,22 +30,13 @@ class FavFolderInfo { fid: json['fid'] as int?, mid: json['mid'] as int? ?? 0, attr: json['attr'] as int? ?? 0, - attrDesc: json['attr_desc'] as String?, title: json['title'] as String? ?? '', cover: json['cover'] as String? ?? '', upper: json['upper'] == null ? null : Owner.fromJson(json['upper'] as Map), - 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? ?? 0, - viewCount: json['view_count'] as int?, - isTop: json['is_top'] as bool?, - type: json['type'] as int?, - bvid: json['bvid'] as String?, ); } diff --git a/lib/models_new/fav/fav_note/arc.dart b/lib/models_new/fav/fav_note/arc.dart deleted file mode 100644 index 710c3761f..000000000 --- a/lib/models_new/fav/fav_note/arc.dart +++ /dev/null @@ -1,29 +0,0 @@ -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 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?, - ); -} diff --git a/lib/models_new/fav/fav_note/data.dart b/lib/models_new/fav/fav_note/data.dart index 37d446d36..316cb859c 100644 --- a/lib/models_new/fav/fav_note/data.dart +++ b/lib/models_new/fav/fav_note/data.dart @@ -1,18 +1,13 @@ import 'package:PiliPlus/models_new/fav/fav_note/list.dart'; -import 'package:PiliPlus/models_new/fav/fav_note/page.dart'; class FavNoteData { List? list; - Page? page; - FavNoteData({this.list, this.page}); + FavNoteData({this.list}); factory FavNoteData.fromJson(Map json) => FavNoteData( list: (json['list'] as List?) ?.map((e) => FavNoteItemModel.fromJson(e as Map)) .toList(), - page: json['page'] == null - ? null - : Page.fromJson(json['page'] as Map), ); } diff --git a/lib/models_new/fav/fav_note/page.dart b/lib/models_new/fav/fav_note/page.dart deleted file mode 100644 index 22984a071..000000000 --- a/lib/models_new/fav/fav_note/page.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Page { - int? total; - int? size; - int? num; - - Page({this.total, this.size, this.num}); - - factory Page.fromJson(Map json) => Page( - total: json['total'] as int?, - size: json['size'] as int?, - num: json['num'] as int?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/area.dart b/lib/models_new/fav/fav_pgc/area.dart deleted file mode 100644 index 8540bf56f..000000000 --- a/lib/models_new/fav/fav_pgc/area.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Area { - int? id; - String? name; - - Area({this.id, this.name}); - - factory Area.fromJson(Map json) => Area( - id: json['id'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/badge_info.dart b/lib/models_new/fav/fav_pgc/badge_info.dart deleted file mode 100644 index fd1c023d3..000000000 --- a/lib/models_new/fav/fav_pgc/badge_info.dart +++ /dev/null @@ -1,27 +0,0 @@ -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 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), - ); -} diff --git a/lib/models_new/fav/fav_pgc/badge_infos.dart b/lib/models_new/fav/fav_pgc/badge_infos.dart deleted file mode 100644 index 5c70bdd3b..000000000 --- a/lib/models_new/fav/fav_pgc/badge_infos.dart +++ /dev/null @@ -1,18 +0,0 @@ -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 json) => BadgeInfos( - contentAttr: json['content_attr'] == null - ? null - : ContentAttr.fromJson(json['content_attr'] as Map), - vipOrPay: json['vip_or_pay'] == null - ? null - : VipOrPay.fromJson(json['vip_or_pay'] as Map), - ); -} diff --git a/lib/models_new/fav/fav_pgc/cc_on_lock.dart b/lib/models_new/fav/fav_pgc/cc_on_lock.dart deleted file mode 100644 index a83feefec..000000000 --- a/lib/models_new/fav/fav_pgc/cc_on_lock.dart +++ /dev/null @@ -1,9 +0,0 @@ -class CcOnLock { - String? typeUrl; - - CcOnLock({this.typeUrl}); - - factory CcOnLock.fromJson(Map json) => CcOnLock( - typeUrl: json['type_url'] as String?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/config_attrs.dart b/lib/models_new/fav/fav_pgc/config_attrs.dart deleted file mode 100644 index 1668484e9..000000000 --- a/lib/models_new/fav/fav_pgc/config_attrs.dart +++ /dev/null @@ -1,39 +0,0 @@ -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 json) => ConfigAttrs( - ccOnLock: json['cc_on_lock'] == null - ? null - : CcOnLock.fromJson(json['cc_on_lock'] as Map), - highlightIneffectiveHd: json['highlight_ineffective_hd'] == null - ? null - : HighlightIneffectiveHd.fromJson( - json['highlight_ineffective_hd'] as Map, - ), - highlightIneffectiveOtt: json['highlight_ineffective_ott'] == null - ? null - : HighlightIneffectiveOtt.fromJson( - json['highlight_ineffective_ott'] as Map, - ), - highlightIneffectivePink: json['highlight_ineffective_pink'] == null - ? null - : HighlightIneffectivePink.fromJson( - json['highlight_ineffective_pink'] as Map, - ), - ); -} diff --git a/lib/models_new/fav/fav_pgc/content_attr.dart b/lib/models_new/fav/fav_pgc/content_attr.dart deleted file mode 100644 index ecb4beba0..000000000 --- a/lib/models_new/fav/fav_pgc/content_attr.dart +++ /dev/null @@ -1,27 +0,0 @@ -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 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), - ); -} diff --git a/lib/models_new/fav/fav_pgc/data.dart b/lib/models_new/fav/fav_pgc/data.dart index db84fd9b3..24ed24b73 100644 --- a/lib/models_new/fav/fav_pgc/data.dart +++ b/lib/models_new/fav/fav_pgc/data.dart @@ -2,18 +2,14 @@ import 'package:PiliPlus/models_new/fav/fav_pgc/list.dart'; class FavPgcData { List? list; - int? pn; - int? ps; int? total; - FavPgcData({this.list, this.pn, this.ps, this.total}); + FavPgcData({this.list, this.total}); factory FavPgcData.fromJson(Map json) => FavPgcData( list: (json['list'] as List?) ?.map((e) => FavPgcItemModel.fromJson(e as Map)) .toList(), - pn: json['pn'] as int?, - ps: json['ps'] as int?, total: json['total'] as int?, ); } diff --git a/lib/models_new/fav/fav_pgc/first_ep_info.dart b/lib/models_new/fav/fav_pgc/first_ep_info.dart deleted file mode 100644 index 452f637de..000000000 --- a/lib/models_new/fav/fav_pgc/first_ep_info.dart +++ /dev/null @@ -1,26 +0,0 @@ -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 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?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/highlight_ineffective_hd.dart b/lib/models_new/fav/fav_pgc/highlight_ineffective_hd.dart deleted file mode 100644 index 38753864b..000000000 --- a/lib/models_new/fav/fav_pgc/highlight_ineffective_hd.dart +++ /dev/null @@ -1,11 +0,0 @@ -class HighlightIneffectiveHd { - String? typeUrl; - - HighlightIneffectiveHd({this.typeUrl}); - - factory HighlightIneffectiveHd.fromJson(Map json) { - return HighlightIneffectiveHd( - typeUrl: json['type_url'] as String?, - ); - } -} diff --git a/lib/models_new/fav/fav_pgc/highlight_ineffective_ott.dart b/lib/models_new/fav/fav_pgc/highlight_ineffective_ott.dart deleted file mode 100644 index 60961e665..000000000 --- a/lib/models_new/fav/fav_pgc/highlight_ineffective_ott.dart +++ /dev/null @@ -1,11 +0,0 @@ -class HighlightIneffectiveOtt { - String? typeUrl; - - HighlightIneffectiveOtt({this.typeUrl}); - - factory HighlightIneffectiveOtt.fromJson(Map json) { - return HighlightIneffectiveOtt( - typeUrl: json['type_url'] as String?, - ); - } -} diff --git a/lib/models_new/fav/fav_pgc/highlight_ineffective_pink.dart b/lib/models_new/fav/fav_pgc/highlight_ineffective_pink.dart deleted file mode 100644 index 3f0433e38..000000000 --- a/lib/models_new/fav/fav_pgc/highlight_ineffective_pink.dart +++ /dev/null @@ -1,11 +0,0 @@ -class HighlightIneffectivePink { - String? typeUrl; - - HighlightIneffectivePink({this.typeUrl}); - - factory HighlightIneffectivePink.fromJson(Map json) { - return HighlightIneffectivePink( - typeUrl: json['type_url'] as String?, - ); - } -} diff --git a/lib/models_new/fav/fav_pgc/list.dart b/lib/models_new/fav/fav_pgc/list.dart index 70a711fcd..5dacc8ce8 100644 --- a/lib/models_new/fav/fav_pgc/list.dart +++ b/lib/models_new/fav/fav_pgc/list.dart @@ -1,208 +1,39 @@ -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/base.dart'; -import 'package:PiliPlus/utils/extension/iterable_ext.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? areas; - String? subtitle; - int? firstEp; - int? canWatch; - Series? series; - Publish? publish; - int? mode; - List
? 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? producers; - String? summary; - List? 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 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), - stat: json['stat'] == null - ? null - : Stat.fromJson(json['stat'] as Map), newEp: json['new_ep'] == null ? null : NewEp.fromJson(json['new_ep'] as Map), - rating: json['rating'] == null - ? null - : Rating.fromJson(json['rating'] as Map), - 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?) - ?.map((e) => Area.fromJson(e as Map)) - .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), - publish: json['publish'] == null - ? null - : Publish.fromJson(json['publish'] as Map), - mode: json['mode'] as int?, - section: (json['section'] as List?) - ?.map((e) => Section.fromJson(e as Map)) - .toList(), - url: json['url'] as String?, - badgeInfo: json['badge_info'] == null - ? null - : BadgeInfo.fromJson(json['badge_info'] as Map), renewalTime: json['renewal_time'] as String?, - firstEpInfo: json['first_ep_info'] == null - ? null - : FirstEpInfo.fromJson(json['first_ep_info'] as Map), - 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), - 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?) - ?.map((e) => Producer.fromJson(e as Map)) - .toList(), - summary: json['summary'] as String?, - styles: (json['styles'] as List?)?.fromCast(), - configAttrs: json['config_attrs'] == null - ? null - : ConfigAttrs.fromJson(json['config_attrs'] as Map), - followStatus: json['follow_status'] as int?, - isNew: json['is_new'] as int?, progress: json['progress'] == '' ? null : json['progress'], - bothFollow: json['both_follow'] as bool?, - subtitle25: json['subtitle_25'] as String?, ); } diff --git a/lib/models_new/fav/fav_pgc/multi_img.dart b/lib/models_new/fav/fav_pgc/multi_img.dart deleted file mode 100644 index fbb762ba7..000000000 --- a/lib/models_new/fav/fav_pgc/multi_img.dart +++ /dev/null @@ -1,11 +0,0 @@ -class MultiImg { - String? color; - String? mediumRemind; - - MultiImg({this.color, this.mediumRemind}); - - factory MultiImg.fromJson(Map json) => MultiImg( - color: json['color'] as String?, - mediumRemind: json['medium_remind'] as String?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/new_ep.dart b/lib/models_new/fav/fav_pgc/new_ep.dart index 6c1bda5db..909748e80 100644 --- a/lib/models_new/fav/fav_pgc/new_ep.dart +++ b/lib/models_new/fav/fav_pgc/new_ep.dart @@ -1,29 +1,11 @@ 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 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?, ); } diff --git a/lib/models_new/fav/fav_pgc/producer.dart b/lib/models_new/fav/fav_pgc/producer.dart deleted file mode 100644 index e08790a57..000000000 --- a/lib/models_new/fav/fav_pgc/producer.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Producer { - int? mid; - int? type; - int? isContribute; - String? title; - - Producer({this.mid, this.type, this.isContribute, this.title}); - - factory Producer.fromJson(Map json) => Producer( - mid: json['mid'] as int?, - type: json['type'] as int?, - isContribute: json['is_contribute'] as int?, - title: json['title'] as String?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/publish.dart b/lib/models_new/fav/fav_pgc/publish.dart deleted file mode 100644 index a0be984fc..000000000 --- a/lib/models_new/fav/fav_pgc/publish.dart +++ /dev/null @@ -1,20 +0,0 @@ -class Publish { - String? pubTime; - String? pubTimeShow; - String? releaseDate; - String? releaseDateShow; - - Publish({ - this.pubTime, - this.pubTimeShow, - this.releaseDate, - this.releaseDateShow, - }); - - factory Publish.fromJson(Map 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?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/rating.dart b/lib/models_new/fav/fav_pgc/rating.dart deleted file mode 100644 index 4b7e6fd9f..000000000 --- a/lib/models_new/fav/fav_pgc/rating.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Rating { - double? score; - int? count; - - Rating({this.score, this.count}); - - factory Rating.fromJson(Map json) => Rating( - score: (json['score'] as num?)?.toDouble(), - count: json['count'] as int?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/rights.dart b/lib/models_new/fav/fav_pgc/rights.dart deleted file mode 100644 index 3882f251d..000000000 --- a/lib/models_new/fav/fav_pgc/rights.dart +++ /dev/null @@ -1,23 +0,0 @@ -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 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?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/section.dart b/lib/models_new/fav/fav_pgc/section.dart deleted file mode 100644 index 100ddd724..000000000 --- a/lib/models_new/fav/fav_pgc/section.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:PiliPlus/utils/extension/iterable_ext.dart'; - -class Section { - int? sectionId; - int? seasonId; - int? limitGroup; - int? watchPlatform; - String? copyright; - int? banAreaShow; - List? episodeIds; - - Section({ - this.sectionId, - this.seasonId, - this.limitGroup, - this.watchPlatform, - this.copyright, - this.banAreaShow, - this.episodeIds, - }); - - factory Section.fromJson(Map 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?)?.fromCast(), - ); -} diff --git a/lib/models_new/fav/fav_pgc/series.dart b/lib/models_new/fav/fav_pgc/series.dart deleted file mode 100644 index 82a195e3e..000000000 --- a/lib/models_new/fav/fav_pgc/series.dart +++ /dev/null @@ -1,23 +0,0 @@ -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 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?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/stat.dart b/lib/models_new/fav/fav_pgc/stat.dart deleted file mode 100644 index 07674e8a7..000000000 --- a/lib/models_new/fav/fav_pgc/stat.dart +++ /dev/null @@ -1,35 +0,0 @@ -class Stat { - int? follow; - int? view; - int? danmaku; - int? reply; - num? 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 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 num?, - seriesFollow: json['series_follow'] as int?, - seriesView: json['series_view'] as int?, - likes: json['likes'] as int?, - favorite: json['favorite'] as int?, - ); -} diff --git a/lib/models_new/fav/fav_pgc/vip_or_pay.dart b/lib/models_new/fav/fav_pgc/vip_or_pay.dart deleted file mode 100644 index 2b8f30568..000000000 --- a/lib/models_new/fav/fav_pgc/vip_or_pay.dart +++ /dev/null @@ -1,27 +0,0 @@ -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 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), - ); -} diff --git a/lib/models_new/fav/fav_topic/page_info.dart b/lib/models_new/fav/fav_topic/page_info.dart index 6974f79cd..0962db4db 100644 --- a/lib/models_new/fav/fav_topic/page_info.dart +++ b/lib/models_new/fav/fav_topic/page_info.dart @@ -1,11 +1,9 @@ class PageInfo { - int? curPageNum; int? total; - PageInfo({this.curPageNum, this.total}); + PageInfo({this.total}); factory PageInfo.fromJson(Map json) => PageInfo( - curPageNum: json['cur_page_num'] as int?, total: json['total'] as int?, ); } diff --git a/lib/models_new/fav/fav_topic/topic_item.dart b/lib/models_new/fav/fav_topic/topic_item.dart index e008a87d3..43fdaed88 100644 --- a/lib/models_new/fav/fav_topic/topic_item.dart +++ b/lib/models_new/fav/fav_topic/topic_item.dart @@ -1,29 +1,14 @@ 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 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?, ); } diff --git a/lib/models_new/follow/list.dart b/lib/models_new/follow/list.dart index f9a53e13f..92c9c1d48 100644 --- a/lib/models_new/follow/list.dart +++ b/lib/models_new/follow/list.dart @@ -3,35 +3,22 @@ import 'package:PiliPlus/models/model_avatar.dart'; class FollowItemModel extends UpItem { int? attribute; - int? mtime; - dynamic tag; - int? special; String? sign; BaseOfficialVerify? officialVerify; - Vip? vip; - String? followTime; FollowItemModel({ required super.mid, this.attribute, - this.mtime, - this.tag, - this.special, super.uname, super.face, this.sign, this.officialVerify, - this.vip, - this.followTime, }); factory FollowItemModel.fromJson(Map json) => FollowItemModel( mid: json['mid'] as int? ?? 0, 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?, @@ -40,9 +27,5 @@ class FollowItemModel extends UpItem { : BaseOfficialVerify.fromJson( json['official_verify'] as Map, ), - vip: json['vip'] == null - ? null - : Vip.fromJson(json['vip'] as Map), - followTime: json['follow_time'] as String?, ); } diff --git a/lib/models_new/history/cursor.dart b/lib/models_new/history/cursor.dart deleted file mode 100644 index a644dcd32..000000000 --- a/lib/models_new/history/cursor.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Cursor { - int? max; - int? viewAt; - String? business; - int? ps; - - Cursor({this.max, this.viewAt, this.business, this.ps}); - - factory Cursor.fromJson(Map json) => Cursor( - max: json['max'] as int?, - viewAt: json['view_at'] as int?, - business: json['business'] as String?, - ps: json['ps'] as int?, - ); -} diff --git a/lib/models_new/history/data.dart b/lib/models_new/history/data.dart index 3f6e96f02..624a352e8 100644 --- a/lib/models_new/history/data.dart +++ b/lib/models_new/history/data.dart @@ -1,18 +1,13 @@ -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? tab; List? list; - HistoryData({this.cursor, this.tab, this.list}); + HistoryData({this.tab, this.list}); factory HistoryData.fromJson(Map json) => HistoryData( - cursor: json['cursor'] == null - ? null - : Cursor.fromJson(json['cursor'] as Map), tab: (json['tab'] as List?) ?.map((e) => HistoryTab.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/history/history.dart b/lib/models_new/history/history.dart index b9b45f4c2..5a2e73494 100644 --- a/lib/models_new/history/history.dart +++ b/lib/models_new/history/history.dart @@ -4,7 +4,6 @@ class History { String? bvid; int? page; int? cid; - String? part; String? business; History({ @@ -13,7 +12,6 @@ class History { this.bvid, this.page, this.cid, - this.part, this.business, }); @@ -23,7 +21,6 @@ class History { bvid: json['bvid'], page: json['page'], cid: json['cid'] == 0 ? null : json['cid'], - part: json['part'], business: json['business'], ); } diff --git a/lib/models_new/history/list.dart b/lib/models_new/history/list.dart index 2c9d485f3..21540a18b 100644 --- a/lib/models_new/history/list.dart +++ b/lib/models_new/history/list.dart @@ -4,24 +4,18 @@ import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class HistoryItemModel with MultiSelectData { String? title; - String? longTitle; String? cover; List? covers; String? uri; late History history; int? videos; String? authorName; - String? authorFace; int? authorMid; int? viewAt; int? progress; String? badge; String? showTitle; int? duration; - String? current; - int? total; - String? newDesc; - int? isFinish; int? isFav; int? kid; String? tagName; @@ -29,24 +23,18 @@ class HistoryItemModel with MultiSelectData { 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, @@ -56,7 +44,6 @@ class HistoryItemModel with MultiSelectData { factory HistoryItemModel.fromJson(Map json) => HistoryItemModel( title: json['title'] as String?, - longTitle: json['long_title'] as String?, cover: json['cover'] as String?, covers: (json['covers'] as List?)?.fromCast(), uri: json['uri'] as String?, @@ -65,17 +52,12 @@ class HistoryItemModel with MultiSelectData { : History.fromJson(json['history'] as Map), 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?, diff --git a/lib/models_new/later/bangumi.dart b/lib/models_new/later/bangumi.dart index 0b1a55efb..a0dc2df20 100644 --- a/lib/models_new/later/bangumi.dart +++ b/lib/models_new/later/bangumi.dart @@ -2,24 +2,15 @@ import 'package:PiliPlus/models_new/later/season.dart'; class Bangumi { int? epId; - String? title; - String? longTitle; - String? cover; Season? season; Bangumi({ this.epId, - this.title, - this.longTitle, - this.cover, this.season, }); factory Bangumi.fromJson(Map json) => Bangumi( epId: json['ep_id'] as int?, - title: json['title'] as String?, - longTitle: json['long_title'] as String?, - cover: json['cover'] as String?, season: json['season'] == null ? null : Season.fromJson(json['season'] as Map), diff --git a/lib/models_new/later/list.dart b/lib/models_new/later/list.dart index 088a299cf..195c417e1 100644 --- a/lib/models_new/later/list.dart +++ b/lib/models_new/later/list.dart @@ -1,6 +1,5 @@ import 'package:PiliPlus/models/model_owner.dart'; import 'package:PiliPlus/models_new/later/bangumi.dart'; -import 'package:PiliPlus/models_new/later/page.dart'; import 'package:PiliPlus/models_new/later/rights.dart'; import 'package:PiliPlus/models_new/later/stat.dart'; import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; @@ -8,7 +7,6 @@ import 'package:PiliPlus/pages/common/multi_select/base.dart'; class LaterItemModel with MultiSelectData { int? aid; - int? videos; String? pic; String? title; String? subtitle; @@ -18,7 +16,6 @@ class LaterItemModel with MultiSelectData { Rights? rights; Owner? owner; Stat? stat; - List? pages; Bangumi? bangumi; int? cid; int? progress; @@ -26,13 +23,11 @@ class LaterItemModel with MultiSelectData { bool? isPgc; String? pgcLabel; bool? isPugv; - int? seasonId; bool? isCharging; Dimension? dimension; LaterItemModel({ this.aid, - this.videos, this.pic, this.title, this.subtitle, @@ -42,7 +37,6 @@ class LaterItemModel with MultiSelectData { this.rights, this.owner, this.stat, - this.pages, this.bangumi, this.cid, this.progress, @@ -50,14 +44,12 @@ class LaterItemModel with MultiSelectData { this.isPgc, this.pgcLabel, this.isPugv, - this.seasonId, this.isCharging, this.dimension, }); factory LaterItemModel.fromJson(Map json) => LaterItemModel( aid: json['aid'] as int?, - videos: json['videos'] as int?, pic: json['pic'] as String?, title: json['title'] as String?, pubdate: json['pubdate'] as int?, @@ -72,9 +64,6 @@ class LaterItemModel with MultiSelectData { stat: json['stat'] == null ? null : Stat.fromJson(json['stat'] as Map), - pages: (json['pages'] as List?) - ?.map((e) => Page.fromJson(e as Map)) - .toList(), bangumi: json['bangumi'] == null ? null : Bangumi.fromJson(json['bangumi'] as Map), @@ -90,7 +79,6 @@ class LaterItemModel with MultiSelectData { isPgc: json['is_pgc'] as bool?, pgcLabel: json['pgc_label'] == '' ? null : json['pgc_label'], isPugv: json['is_pugv'] as bool?, - seasonId: json['season_id'] as int?, isCharging: json['charging_pay']?['level'] != null, dimension: json['dimension'] == null ? null diff --git a/lib/models_new/later/page.dart b/lib/models_new/later/page.dart deleted file mode 100644 index f902e749c..000000000 --- a/lib/models_new/later/page.dart +++ /dev/null @@ -1,17 +0,0 @@ -class Page { - int? cid; - int? page; - int? duration; - - Page({ - this.cid, - this.page, - this.duration, - }); - - factory Page.fromJson(Map json) => Page( - cid: json['cid'] as int?, - page: json['page'] as int?, - duration: json['duration'] as int?, - ); -} diff --git a/lib/models_new/later/season.dart b/lib/models_new/later/season.dart index c45969b3f..3d413a980 100644 --- a/lib/models_new/later/season.dart +++ b/lib/models_new/later/season.dart @@ -1,14 +1,11 @@ class Season { - int? seasonId; String? title; Season({ - this.seasonId, this.title, }); factory Season.fromJson(Map json) => Season( - seasonId: json['season_id'] as int?, title: json['title'] as String?, ); } diff --git a/lib/models_new/later/stat.dart b/lib/models_new/later/stat.dart index 8c03db17d..fafc04b74 100644 --- a/lib/models_new/later/stat.dart +++ b/lib/models_new/later/stat.dart @@ -1,16 +1,13 @@ class Stat { - int? aid; int? view; int? danmaku; Stat({ - this.aid, this.view, this.danmaku, }); factory Stat.fromJson(Map json) => Stat( - aid: json['aid'] as int?, view: json['view'] as int?, danmaku: json['danmaku'] as int?, ); diff --git a/lib/models_new/live/live_area_list/area_list.dart b/lib/models_new/live/live_area_list/area_list.dart index e9d83bb38..e7dfd6b21 100644 --- a/lib/models_new/live/live_area_list/area_list.dart +++ b/lib/models_new/live/live_area_list/area_list.dart @@ -1,17 +1,13 @@ import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart'; class AreaList { - int? id; String? name; - int? parentAreaType; List? areaList; - AreaList({this.id, this.name, this.parentAreaType, this.areaList}); + AreaList({this.name, this.areaList}); factory AreaList.fromJson(Map json) => AreaList( - id: json['id'] as int?, name: json['name'] ?? '', - parentAreaType: json['parent_area_type'] as int?, areaList: (json['area_list'] as List?) ?.map((e) => AreaItem.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/live/live_contribution_rank/item.dart b/lib/models_new/live/live_contribution_rank/item.dart index 4cc838f0c..33ea786f4 100644 --- a/lib/models_new/live/live_contribution_rank/item.dart +++ b/lib/models_new/live/live_contribution_rank/item.dart @@ -4,7 +4,6 @@ class LiveContributionRankItem { int? uid; String? name; String? face; - int? rank; int? score; UinfoMedal? uinfoMedal; @@ -12,7 +11,6 @@ class LiveContributionRankItem { this.uid, this.name, this.face, - this.rank, this.score, this.uinfoMedal, }); @@ -22,7 +20,6 @@ class LiveContributionRankItem { uid: json['uid'] as int?, name: json['name'] as String?, face: json['face'] as String?, - rank: json['rank'] as int?, score: json['score'] as int?, uinfoMedal: json['uinfo']?['medal'] == null ? null diff --git a/lib/models_new/live/live_feed_index/card_data_list_item.dart b/lib/models_new/live/live_feed_index/card_data_list_item.dart index 066924d78..16e561fd0 100644 --- a/lib/models_new/live/live_feed_index/card_data_list_item.dart +++ b/lib/models_new/live/live_feed_index/card_data_list_item.dart @@ -10,11 +10,8 @@ class CardLiveItem { String? _systemCover; String? get systemCover => _systemCover ?? cover; String? title; - int? liveTime; String? areaName; int? areaV2Id; - String? areaV2Name; - String? areaV2ParentName; int? areaV2ParentId; WatchedShow? watchedShow; @@ -26,11 +23,8 @@ class CardLiveItem { this.cover, String? systemCover, this.title, - this.liveTime, this.areaName, this.areaV2Id, - this.areaV2Name, - this.areaV2ParentName, this.areaV2ParentId, this.watchedShow, }) : _systemCover = noneNullOrEmptyString(systemCover); @@ -43,11 +37,8 @@ class CardLiveItem { cover: json['cover'] as String?, systemCover: json['system_cover'], title: json['title'] as String?, - liveTime: json['live_time'] as int?, areaName: json['area_name'] as String?, areaV2Id: json['area_v2_id'] as int?, - areaV2Name: json['area_v2_name'] as String?, - areaV2ParentName: json['area_v2_parent_name'] as String?, areaV2ParentId: json['area_v2_parent_id'] as int?, watchedShow: json['watched_show'] == null ? null diff --git a/lib/models_new/live/live_follow/item.dart b/lib/models_new/live/live_follow/item.dart index 4472d97ed..3163aa071 100644 --- a/lib/models_new/live/live_follow/item.dart +++ b/lib/models_new/live/live_follow/item.dart @@ -1,37 +1,25 @@ class LiveFollowItem { int? roomid; - int? uid; String? uname; String? title; - String? face; - int? liveStatus; String? areaName; - String? areaNameV2; String? textSmall; String? roomCover; LiveFollowItem({ this.roomid, - this.uid, this.uname, this.title, - this.face, - this.liveStatus, this.areaName, - this.areaNameV2, this.textSmall, this.roomCover, }); factory LiveFollowItem.fromJson(Map json) => LiveFollowItem( roomid: json['roomid'] as int?, - uid: json['uid'] as int?, uname: json['uname'] as String?, title: json['title'] as String?, - face: json['face'] as String?, - liveStatus: json['live_status'] as int?, areaName: json['area_name'] as String?, - areaNameV2: json['area_name_v2'] as String?, textSmall: json['text_small'] as String?, roomCover: json['room_cover'] as String?, ); diff --git a/lib/models_new/live/live_medal_wall/data.dart b/lib/models_new/live/live_medal_wall/data.dart index 9c37865ae..02b1f844a 100644 --- a/lib/models_new/live/live_medal_wall/data.dart +++ b/lib/models_new/live/live_medal_wall/data.dart @@ -5,16 +5,12 @@ class MedalWallData { int? count; String? name; String? icon; - int? uid; - int? level; MedalWallData({ this.list, this.count, this.name, this.icon, - this.uid, - this.level, }); factory MedalWallData.fromJson(Map json) => MedalWallData( @@ -24,7 +20,5 @@ class MedalWallData { count: json['count'] as int?, name: json['name'] as String?, icon: json['icon'] as String?, - uid: json['uid'] as int?, - level: json['level'] as int?, ); } diff --git a/lib/models_new/live/live_room_info_h5/room_info.dart b/lib/models_new/live/live_room_info_h5/room_info.dart index 9b575d584..7d7124bc7 100644 --- a/lib/models_new/live/live_room_info_h5/room_info.dart +++ b/lib/models_new/live/live_room_info_h5/room_info.dart @@ -1,35 +1,20 @@ class RoomInfo { int? uid; - int? roomId; String? title; String? cover; - int? liveStatus; - int? liveStartTime; - int? online; String? appBackground; - String? subSessionKey; RoomInfo({ this.uid, - this.roomId, this.title, this.cover, - this.liveStatus, - this.liveStartTime, - this.online, this.appBackground, - this.subSessionKey, }); factory RoomInfo.fromJson(Map json) => RoomInfo( uid: json['uid'] as int?, - roomId: json['room_id'] as int?, title: json['title'] as String?, cover: json['cover'] as String?, - liveStatus: json['live_status'] as int?, - liveStartTime: json['live_start_time'] as int?, - online: json['online'] as int?, appBackground: json['app_background'] as String?, - subSessionKey: json['sub_session_key'] as String?, ); } diff --git a/lib/models_new/live/live_room_play_info/codec.dart b/lib/models_new/live/live_room_play_info/codec.dart index f918cf1c1..1f295cde2 100644 --- a/lib/models_new/live/live_room_play_info/codec.dart +++ b/lib/models_new/live/live_room_play_info/codec.dart @@ -2,39 +2,24 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class CodecItem { - String? codecName; int? currentQn; List? acceptQn; String? baseUrl; List? urlInfo; - dynamic hdrQn; - int? dolbyType; - String? attrName; - int? hdrType; CodecItem({ - this.codecName, this.currentQn, this.acceptQn, this.baseUrl, this.urlInfo, - this.hdrQn, - this.dolbyType, - this.attrName, - this.hdrType, }); factory CodecItem.fromJson(Map json) => CodecItem( - codecName: json['codec_name'] as String?, currentQn: json['current_qn'] as int?, acceptQn: (json['accept_qn'] as List?)?.fromCast(), baseUrl: json['base_url'] as String?, urlInfo: (json['url_info'] as List?) ?.map((e) => UrlInfo.fromJson(e as Map)) .toList(), - hdrQn: json['hdr_qn'] as dynamic, - dolbyType: json['dolby_type'] as int?, - attrName: json['attr_name'] as String?, - hdrType: json['hdr_type'] as int?, ); } diff --git a/lib/models_new/live/live_room_play_info/format.dart b/lib/models_new/live/live_room_play_info/format.dart index 25d0578d8..afd8de5c5 100644 --- a/lib/models_new/live/live_room_play_info/format.dart +++ b/lib/models_new/live/live_room_play_info/format.dart @@ -1,17 +1,13 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/codec.dart'; class Format { - String? formatName; List? codec; - String? masterUrl; - Format({this.formatName, this.codec, this.masterUrl}); + Format({this.codec}); factory Format.fromJson(Map json) => Format( - formatName: json['format_name'] as String?, codec: (json['codec'] as List?) ?.map((e) => CodecItem.fromJson(e as Map)) .toList(), - masterUrl: json['master_url'] as String?, ); } diff --git a/lib/models_new/live/live_room_play_info/playurl.dart b/lib/models_new/live/live_room_play_info/playurl.dart index f8b220fb9..07977bb3d 100644 --- a/lib/models_new/live/live_room_play_info/playurl.dart +++ b/lib/models_new/live/live_room_play_info/playurl.dart @@ -1,16 +1,13 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/stream.dart'; class Playurl { - int? cid; List? stream; Playurl({ - this.cid, this.stream, }); factory Playurl.fromJson(Map json) => Playurl( - cid: json['cid'] as int?, stream: (json['stream'] as List?) ?.map((e) => Stream.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/live/live_room_play_info/stream.dart b/lib/models_new/live/live_room_play_info/stream.dart index 189d6edde..18b3a6578 100644 --- a/lib/models_new/live/live_room_play_info/stream.dart +++ b/lib/models_new/live/live_room_play_info/stream.dart @@ -1,13 +1,11 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/format.dart'; class Stream { - String? protocolName; List? format; - Stream({this.protocolName, this.format}); + Stream({this.format}); factory Stream.fromJson(Map json) => Stream( - protocolName: json['protocol_name'] as String?, format: (json['format'] as List?) ?.map((e) => Format.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/live/live_room_play_info/url_info.dart b/lib/models_new/live/live_room_play_info/url_info.dart index 1252553a0..d32d111d3 100644 --- a/lib/models_new/live/live_room_play_info/url_info.dart +++ b/lib/models_new/live/live_room_play_info/url_info.dart @@ -1,13 +1,11 @@ class UrlInfo { String? host; String? extra; - int? streamTtl; - UrlInfo({this.host, this.extra, this.streamTtl}); + UrlInfo({this.host, this.extra}); factory UrlInfo.fromJson(Map json) => UrlInfo( host: json['host'] as String?, extra: json['extra'] as String?, - streamTtl: json['stream_ttl'] as int?, ); } diff --git a/lib/models_new/live/live_search/data.dart b/lib/models_new/live/live_search/data.dart index 7a5853b95..ca649254d 100644 --- a/lib/models_new/live/live_search/data.dart +++ b/lib/models_new/live/live_search/data.dart @@ -2,24 +2,15 @@ import 'package:PiliPlus/models_new/live/live_search/room.dart'; import 'package:PiliPlus/models_new/live/live_search/user.dart'; class LiveSearchData { - String? type; - int? page; - int? pagesize; Room? room; User? user; LiveSearchData({ - this.type, - this.page, - this.pagesize, this.room, this.user, }); factory LiveSearchData.fromJson(Map json) => LiveSearchData( - type: json['type'] as String?, - page: json['page'] as int?, - pagesize: json['pagesize'] as int?, room: json['room'] == null ? null : Room.fromJson(json['room'] as Map), diff --git a/lib/models_new/live/live_search/live_search.dart b/lib/models_new/live/live_search/live_search.dart deleted file mode 100644 index 867b269cd..000000000 --- a/lib/models_new/live/live_search/live_search.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:PiliPlus/models_new/live/live_search/data.dart'; - -class LiveSearch { - int? code; - String? message; - int? ttl; - LiveSearchData? data; - - LiveSearch({this.code, this.message, this.ttl, this.data}); - - factory LiveSearch.fromJson(Map json) => LiveSearch( - code: json['code'] as int?, - message: json['message'] as String?, - ttl: json['ttl'] as int?, - data: json['data'] == null - ? null - : LiveSearchData.fromJson(json['data'] as Map), - ); -} diff --git a/lib/models_new/live/live_search/room.dart b/lib/models_new/live/live_search/room.dart index a1ada0973..d3dbde303 100644 --- a/lib/models_new/live/live_search/room.dart +++ b/lib/models_new/live/live_search/room.dart @@ -3,9 +3,8 @@ import 'package:PiliPlus/models_new/live/live_search/room_item.dart'; class Room { List? list; int? totalRoom; - int? totalPage; - Room({this.list, this.totalRoom, this.totalPage}); + Room({this.list, this.totalRoom}); factory Room.fromJson(Map json) => Room( list: (json['list'] as List?) @@ -14,6 +13,5 @@ class Room { ) .toList(), totalRoom: json['total_room'] as int?, - totalPage: json['total_page'] as int?, ); } diff --git a/lib/models_new/live/live_search/user.dart b/lib/models_new/live/live_search/user.dart index 54f348723..dbbaf7919 100644 --- a/lib/models_new/live/live_search/user.dart +++ b/lib/models_new/live/live_search/user.dart @@ -3,15 +3,13 @@ import 'package:PiliPlus/models_new/live/live_search/user_item.dart'; class User { List? list; int? totalUser; - int? totalPage; - User({this.list, this.totalUser, this.totalPage}); + User({this.list, this.totalUser}); factory User.fromJson(Map json) => User( list: (json['list'] as List?) ?.map((e) => LiveSearchUserItemModel.fromJson(e)) .toList(), totalUser: json['total_user'] as int?, - totalPage: json['total_page'] as int?, ); } diff --git a/lib/models_new/live/live_second_list/tag.dart b/lib/models_new/live/live_second_list/tag.dart index ed6ecde86..b84a6761c 100644 --- a/lib/models_new/live/live_second_list/tag.dart +++ b/lib/models_new/live/live_second_list/tag.dart @@ -1,16 +1,13 @@ class LiveSecondTag { - int? id; String? name; String? sortType; LiveSecondTag({ - this.id, this.name, this.sortType, }); factory LiveSecondTag.fromJson(Map json) => LiveSecondTag( - id: json['id'], name: json['name'], sortType: json['sort_type'], ); diff --git a/lib/models_new/login_devices/device.dart b/lib/models_new/login_devices/device.dart index 692711194..597dd2a83 100644 --- a/lib/models_new/login_devices/device.dart +++ b/lib/models_new/login_devices/device.dart @@ -1,32 +1,20 @@ class LoginDevice { - int? mid; - String? localId; String? deviceName; - String? devicePlatform; bool? isCurrentDevice; String? latestLoginAt; String? source; - int? origin; LoginDevice({ - this.mid, - this.localId, this.deviceName, - this.devicePlatform, this.isCurrentDevice, this.latestLoginAt, this.source, - this.origin, }); factory LoginDevice.fromJson(Map json) => LoginDevice( - mid: json['mid'] as int?, - localId: json['local_id'] as String?, deviceName: json['device_name'] as String?, - devicePlatform: json['device_platform'] as String?, isCurrentDevice: json['is_current_device'] as bool?, latestLoginAt: json['latest_login_at'] as String?, source: json['source'] as String?, - origin: json['origin'] as int?, ); } diff --git a/lib/models_new/login_log/data.dart b/lib/models_new/login_log/data.dart index 18edab6ee..9f68ac61a 100644 --- a/lib/models_new/login_log/data.dart +++ b/lib/models_new/login_log/data.dart @@ -1,13 +1,11 @@ import 'package:PiliPlus/models_new/login_log/list.dart'; class LoginLogData { - int? count; List? list; - LoginLogData({this.count, this.list}); + LoginLogData({this.list}); factory LoginLogData.fromJson(Map json) => LoginLogData( - count: json['count'] as int?, list: (json['list'] as List?) ?.map((e) => LoginLogItem.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/login_log/list.dart b/lib/models_new/login_log/list.dart index 032c7141a..7cc2f7d85 100644 --- a/lib/models_new/login_log/list.dart +++ b/lib/models_new/login_log/list.dart @@ -1,26 +1,17 @@ class LoginLogItem { final String ip; - final int? time; final String timeAt; - final bool? status; - final int? type; final String geo; const LoginLogItem({ required this.ip, - this.time, required this.timeAt, - this.status, - this.type, required this.geo, }); factory LoginLogItem.fromJson(Map json) => LoginLogItem( ip: json['ip'] ?? '', - time: json['time'] as int?, timeAt: json['time_at'] ?? '', - status: json['status'] as bool?, - type: json['type'] as int?, geo: json['geo'] ?? '', ); } diff --git a/lib/models_new/match/match_info/contest.dart b/lib/models_new/match/match_info/contest.dart index e3dad8056..38a28dd60 100644 --- a/lib/models_new/match/match_info/contest.dart +++ b/lib/models_new/match/match_info/contest.dart @@ -1,159 +1,41 @@ -import 'package:PiliPlus/models_new/match/match_info/home_away.dart'; import 'package:PiliPlus/models_new/match/match_info/season.dart'; -import 'package:PiliPlus/models_new/match/match_info/success_teaminfo.dart'; import 'package:PiliPlus/models_new/match/match_info/team.dart'; class MatchContest { - int? id; String? gameStage; int? stime; - int? etime; int? homeId; int? awayId; int? homeScore; int? awayScore; int? liveRoom; - int? aid; - int? collection; - String? collectionBvid; - int? gameState; - String? dic; - String? ctime; - String? mtime; - int? status; - int? sid; - int? mid; Season? season; MatchTeam? homeTeam; MatchTeam? awayTeam; - int? special; - int? successTeam; - SuccessTeaminfo? successTeaminfo; - String? specialName; - String? specialTips; - String? specialImage; - String? playback; - String? collectionUrl; - String? liveUrl; - int? dataType; - int? matchId; - int? guessType; - int? guessShow; - String? bvid; - String? gameStage1; - String? gameStage2; - int? liveStatus; - int? livePopular; - String? liveCover; - int? pushSwitch; - String? liveTitle; - int? seriesId; int? contestStatus; - int? contestFreeze; - int? startTime; - int? endTime; - String? title; - String? playBack; - int? seasonId; - int? isSub; - int? isGuess; - HomeAway? home; - HomeAway? away; - dynamic series; - String? prospect; - String? afterContestVideo; - int? homeSmallScore; - int? awaySmallScore; - String? watchPoint; - String? watchPointIcon; - dynamic hottestPlayer; MatchContest({ - this.id, this.gameStage, this.stime, - this.etime, this.homeId, this.awayId, this.homeScore, this.awayScore, this.liveRoom, - this.aid, - this.collection, - this.collectionBvid, - this.gameState, - this.dic, - this.ctime, - this.mtime, - this.status, - this.sid, - this.mid, this.season, this.homeTeam, this.awayTeam, - this.special, - this.successTeam, - this.successTeaminfo, - this.specialName, - this.specialTips, - this.specialImage, - this.playback, - this.collectionUrl, - this.liveUrl, - this.dataType, - this.matchId, - this.guessType, - this.guessShow, - this.bvid, - this.gameStage1, - this.gameStage2, - this.liveStatus, - this.livePopular, - this.liveCover, - this.pushSwitch, - this.liveTitle, - this.seriesId, this.contestStatus, - this.contestFreeze, - this.startTime, - this.endTime, - this.title, - this.playBack, - this.seasonId, - this.isSub, - this.isGuess, - this.home, - this.away, - this.series, - this.prospect, - this.afterContestVideo, - this.homeSmallScore, - this.awaySmallScore, - this.watchPoint, - this.watchPointIcon, - this.hottestPlayer, }); factory MatchContest.fromJson(Map json) => MatchContest( - id: json['id'] as int?, gameStage: json['game_stage'] as String?, stime: json['stime'] as int?, - etime: json['etime'] as int?, homeId: json['home_id'] as int?, awayId: json['away_id'] as int?, homeScore: json['home_score'] as int?, awayScore: json['away_score'] as int?, liveRoom: json['live_room'] as int?, - aid: json['aid'] as int?, - collection: json['collection'] as int?, - collectionBvid: json['collection_bvid'] as String?, - gameState: json['game_state'] as int?, - dic: json['dic'] as String?, - ctime: json['ctime'] as String?, - mtime: json['mtime'] as String?, - status: json['status'] as int?, - sid: json['sid'] as int?, - mid: json['mid'] as int?, season: json['season'] == null ? null : Season.fromJson(json['season'] as Map), @@ -163,54 +45,6 @@ class MatchContest { awayTeam: json['away_team'] == null ? null : MatchTeam.fromJson(json['away_team'] as Map), - special: json['special'] as int?, - successTeam: json['success_team'] as int?, - successTeaminfo: json['success_teaminfo'] == null - ? null - : SuccessTeaminfo.fromJson( - json['success_teaminfo'] as Map, - ), - specialName: json['special_name'] as String?, - specialTips: json['special_tips'] as String?, - specialImage: json['special_image'] as String?, - playback: json['playback'] as String?, - collectionUrl: json['collection_url'] as String?, - liveUrl: json['live_url'] as String?, - dataType: json['data_type'] as int?, - matchId: json['match_id'] as int?, - guessType: json['guess_type'] as int?, - guessShow: json['guess_show'] as int?, - bvid: json['bvid'] as String?, - gameStage1: json['game_stage1'] as String?, - gameStage2: json['game_stage2'] as String?, - liveStatus: json['live_status'] as int?, - livePopular: json['live_popular'] as int?, - liveCover: json['live_cover'] as String?, - pushSwitch: json['push_switch'] as int?, - liveTitle: json['live_title'] as String?, - seriesId: json['series_id'] as int?, contestStatus: json['contest_status'] as int?, - contestFreeze: json['contest_freeze'] as int?, - startTime: json['start_time'] as int?, - endTime: json['end_time'] as int?, - title: json['title'] as String?, - playBack: json['play_back'] as String?, - seasonId: json['season_id'] as int?, - isSub: json['is_sub'] as int?, - isGuess: json['is_guess'] as int?, - home: json['home'] == null - ? null - : HomeAway.fromJson(json['home'] as Map), - away: json['away'] == null - ? null - : HomeAway.fromJson(json['away'] as Map), - series: json['series'] as dynamic, - prospect: json['prospect'] as String?, - afterContestVideo: json['after_contest_video'] as String?, - homeSmallScore: json['home_small_score'] as int?, - awaySmallScore: json['away_small_score'] as int?, - watchPoint: json['watch_point'] as String?, - watchPointIcon: json['watch_point_icon'] as String?, - hottestPlayer: json['hottest_player'] as dynamic, ); } diff --git a/lib/models_new/match/match_info/home_away.dart b/lib/models_new/match/match_info/home_away.dart deleted file mode 100644 index 727cd046d..000000000 --- a/lib/models_new/match/match_info/home_away.dart +++ /dev/null @@ -1,41 +0,0 @@ -class HomeAway { - int? id; - String? icon; - String? name; - int? wins; - String? region; - int? regionId; - int? externalTeamId; - String? divisionName; - String? divisionLogo; - dynamic playerGradeDetail; - bool? isSuccessTeam; - - HomeAway({ - this.id, - this.icon, - this.name, - this.wins, - this.region, - this.regionId, - this.externalTeamId, - this.divisionName, - this.divisionLogo, - this.playerGradeDetail, - this.isSuccessTeam, - }); - - factory HomeAway.fromJson(Map json) => HomeAway( - id: json['id'] as int?, - icon: json['icon'] as String?, - name: json['name'] as String?, - wins: json['wins'] as int?, - region: json['region'] as String?, - regionId: json['region_id'] as int?, - externalTeamId: json['ExternalTeamId'] as int?, - divisionName: json['division_name'] as String?, - divisionLogo: json['division_logo'] as String?, - playerGradeDetail: json['player_grade_detail'] as dynamic, - isSuccessTeam: json['is_success_team'] as bool?, - ); -} diff --git a/lib/models_new/match/match_info/season.dart b/lib/models_new/match/match_info/season.dart index 70d526e54..6af2fd717 100644 --- a/lib/models_new/match/match_info/season.dart +++ b/lib/models_new/match/match_info/season.dart @@ -1,83 +1,14 @@ class Season { - int? id; - int? mid; String? title; - String? subTitle; - int? stime; - int? etime; - String? sponsor; String? logo; - String? dic; - int? status; - int? ctime; - int? mtime; - int? rank; - int? isApp; - String? url; - String? dataFocus; - String? focusUrl; - int? leidaSid; - int? gameType; - String? searchImage; - int? syncPlatform; - String? centreLogo; - int? centreStatus; - String? centrePcLogo; - int? seasonType; Season({ - this.id, - this.mid, this.title, - this.subTitle, - this.stime, - this.etime, - this.sponsor, this.logo, - this.dic, - this.status, - this.ctime, - this.mtime, - this.rank, - this.isApp, - this.url, - this.dataFocus, - this.focusUrl, - this.leidaSid, - this.gameType, - this.searchImage, - this.syncPlatform, - this.centreLogo, - this.centreStatus, - this.centrePcLogo, - this.seasonType, }); factory Season.fromJson(Map json) => Season( - id: json['id'] as int?, - mid: json['mid'] as int?, title: json['title'] as String?, - subTitle: json['sub_title'] as String?, - stime: json['stime'] as int?, - etime: json['etime'] as int?, - sponsor: json['sponsor'] as String?, logo: json['logo'] as String?, - dic: json['dic'] as String?, - status: json['status'] as int?, - ctime: json['ctime'] as int?, - mtime: json['mtime'] as int?, - rank: json['rank'] as int?, - isApp: json['is_app'] as int?, - url: json['url'] as String?, - dataFocus: json['data_focus'] as String?, - focusUrl: json['focus_url'] as String?, - leidaSid: json['leida_sid'] as int?, - gameType: json['game_type'] as int?, - searchImage: json['search_image'] as String?, - syncPlatform: json['sync_platform'] as int?, - centreLogo: json['centre_logo'] as String?, - centreStatus: json['centre_status'] as int?, - centrePcLogo: json['centre_pc_logo'] as String?, - seasonType: json['season_type'] as int?, ); } diff --git a/lib/models_new/match/match_info/success_teaminfo.dart b/lib/models_new/match/match_info/success_teaminfo.dart deleted file mode 100644 index b5f04fc09..000000000 --- a/lib/models_new/match/match_info/success_teaminfo.dart +++ /dev/null @@ -1,67 +0,0 @@ -class SuccessTeaminfo { - int? id; - String? title; - String? subTitle; - String? eTitle; - int? createTime; - String? area; - String? logo; - int? uid; - String? members; - String? dic; - int? isDeleted; - String? videoUrl; - String? profile; - int? leidaTid; - int? replyId; - int? teamType; - int? regionId; - String? divisionName; - String? divisionLogo; - - SuccessTeaminfo({ - this.id, - this.title, - this.subTitle, - this.eTitle, - this.createTime, - this.area, - this.logo, - this.uid, - this.members, - this.dic, - this.isDeleted, - this.videoUrl, - this.profile, - this.leidaTid, - this.replyId, - this.teamType, - this.regionId, - this.divisionName, - this.divisionLogo, - }); - - factory SuccessTeaminfo.fromJson(Map json) { - return SuccessTeaminfo( - id: json['id'] as int?, - title: json['title'] as String?, - subTitle: json['sub_title'] as String?, - eTitle: json['e_title'] as String?, - createTime: json['create_time'] as int?, - area: json['area'] as String?, - logo: json['logo'] as String?, - uid: json['uid'] as int?, - members: json['members'] as String?, - dic: json['dic'] as String?, - isDeleted: json['is_deleted'] as int?, - videoUrl: json['video_url'] as String?, - profile: json['profile'] as String?, - leidaTid: json['leida_tid'] as int?, - replyId: json['reply_id'] as int?, - teamType: json['team_type'] as int?, - regionId: json['region_id'] as int?, - divisionName: json['division_name'] as String?, - divisionLogo: json['division_logo'] as String?, - ); - } -} diff --git a/lib/models_new/match/match_info/team.dart b/lib/models_new/match/match_info/team.dart index e3e7c227f..0931b4724 100644 --- a/lib/models_new/match/match_info/team.dart +++ b/lib/models_new/match/match_info/team.dart @@ -1,87 +1,14 @@ class MatchTeam { - int? id; String? title; - String? subTitle; - String? eTitle; - int? createTime; - String? area; String? logo; - int? uid; - String? members; - String? dic; - int? isDeleted; - String? videoUrl; - String? profile; - int? leidaTid; - int? replyId; - int? teamType; - int? regionId; - String? divisionName; - String? divisionLogo; MatchTeam({ - this.id, this.title, - this.subTitle, - this.eTitle, - this.createTime, - this.area, this.logo, - this.uid, - this.members, - this.dic, - this.isDeleted, - this.videoUrl, - this.profile, - this.leidaTid, - this.replyId, - this.teamType, - this.regionId, - this.divisionName, - this.divisionLogo, }); factory MatchTeam.fromJson(Map json) => MatchTeam( - id: json['id'] as int?, title: json['title'] as String?, - subTitle: json['sub_title'] as String?, - eTitle: json['e_title'] as String?, - createTime: json['create_time'] as int?, - area: json['area'] as String?, logo: json['logo'] as String?, - uid: json['uid'] as int?, - members: json['members'] as String?, - dic: json['dic'] as String?, - isDeleted: json['is_deleted'] as int?, - videoUrl: json['video_url'] as String?, - profile: json['profile'] as String?, - leidaTid: json['leida_tid'] as int?, - replyId: json['reply_id'] as int?, - teamType: json['team_type'] as int?, - regionId: json['region_id'] as int?, - divisionName: json['division_name'] as String?, - divisionLogo: json['division_logo'] as String?, ); - - Map toJson() => { - 'id': id, - 'title': title, - 'sub_title': subTitle, - 'e_title': eTitle, - 'create_time': createTime, - 'area': area, - 'logo': logo, - 'uid': uid, - 'members': members, - 'dic': dic, - 'is_deleted': isDeleted, - 'video_url': videoUrl, - 'profile': profile, - 'leida_tid': leidaTid, - 'reply_id': replyId, - 'team_type': teamType, - 'region_id': regionId, - 'division_name': divisionName, - 'division_logo': divisionLogo, - }; } diff --git a/lib/models_new/media_list/badge.dart b/lib/models_new/media_list/badge.dart deleted file mode 100644 index f4ebc7cef..000000000 --- a/lib/models_new/media_list/badge.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Badge { - String? text; - int? bgStyle; - String? img; - - Badge({this.text, this.bgStyle, this.img}); - - factory Badge.fromJson(Map json) => Badge( - text: json['text'] as String?, - bgStyle: json['bg_style'] as int?, - img: json['img'] as String?, - ); -} diff --git a/lib/models_new/media_list/coin.dart b/lib/models_new/media_list/coin.dart deleted file mode 100644 index 98bab6dd1..000000000 --- a/lib/models_new/media_list/coin.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Coin { - num? maxNum; - num? coinNumber; - - Coin({this.maxNum, this.coinNumber}); - - factory Coin.fromJson(Map json) => Coin( - maxNum: json['max_num'] as num?, - coinNumber: json['coin_number'] as num?, - ); -} diff --git a/lib/models_new/media_list/data.dart b/lib/models_new/media_list/data.dart index e4331fa41..4b1acb88b 100644 --- a/lib/models_new/media_list/data.dart +++ b/lib/models_new/media_list/data.dart @@ -2,15 +2,9 @@ import 'package:PiliPlus/models_new/media_list/media_list.dart'; class MediaListData { List mediaList; - bool? hasMore; - int? totalCount; - String? nextStartKey; MediaListData({ required this.mediaList, - this.hasMore, - this.totalCount, - this.nextStartKey, }); factory MediaListData.fromJson(Map json) => MediaListData( @@ -19,8 +13,5 @@ class MediaListData { ?.map((e) => MediaListItemModel.fromJson(e as Map)) .toList() ?? [], - hasMore: json['has_more'] as bool?, - totalCount: json['total_count'] as int?, - nextStartKey: json['next_start_key'] as String?, ); } diff --git a/lib/models_new/media_list/media_list.dart b/lib/models_new/media_list/media_list.dart index 54662209b..e7b68da93 100644 --- a/lib/models_new/media_list/media_list.dart +++ b/lib/models_new/media_list/media_list.dart @@ -1,110 +1,48 @@ import 'package:PiliPlus/models/model_owner.dart'; import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart'; -import 'package:PiliPlus/models_new/media_list/coin.dart'; -import 'package:PiliPlus/models_new/media_list/ogv_info.dart'; import 'package:PiliPlus/models_new/media_list/page.dart'; -import 'package:PiliPlus/models_new/media_list/rights.dart'; import 'package:PiliPlus/models_new/video/video_detail/episode.dart'; class MediaListItemModel extends BaseEpisodeItem { @override int? get id => aid; - int? offset; - int? index; String? intro; - int? attr; - int? tid; - int? copyRight; CntInfo? cntInfo; int? duration; - int? pubtime; - int? likeState; - int? favState; - int? page; List? pages; int? type; Owner? upper; - String? link; - String? shortLink; - Rights? rights; - dynamic elecInfo; - Coin? coin; - OgvInfo? ogvInfo; - double? progressPercent; - bool? forbidFav; - int? moreType; - int? businessOid; @override int? get cid => pages?.firstOrNull?.id; MediaListItemModel({ super.aid, - this.offset, - this.index, this.intro, - this.attr, - this.tid, - this.copyRight, this.cntInfo, super.cover, this.duration, - this.pubtime, - this.likeState, - this.favState, - this.page, this.pages, super.title, this.type, this.upper, - this.link, super.bvid, - this.shortLink, - this.rights, - this.elecInfo, - this.coin, - this.ogvInfo, - this.progressPercent, super.badge, - this.forbidFav, - this.moreType, - this.businessOid, super.cid, }); MediaListItemModel.fromJson(Map json) { aid = json['id'] as int?; - offset = json['offset'] as int?; - index = json['index'] as int?; intro = json['intro'] as String?; - attr = json['attr'] as int?; - tid = json['tid'] as int?; - copyRight = json['copy_right'] as int?; cntInfo = json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info']); cover = json['cover'] as String?; duration = json['duration'] as int?; - pubtime = json['pubtime'] as int?; - likeState = json['like_state'] as int?; - favState = json['fav_state'] as int?; - page = json['page'] as int?; pages = (json['pages'] as List?)?.map((e) => Page.fromJson(e)).toList(); title = json['title'] as String?; type = json['type'] as int?; upper = json['upper'] == null ? null : Owner.fromJson(json['upper']); - link = json['link'] as String?; bvid = json['bv_id'] as String?; - shortLink = json['short_link'] as String?; - rights = json['rights'] == null ? null : Rights.fromJson(json['rights']); - elecInfo = json['elec_info'] as dynamic; - coin = json['coin'] == null ? null : Coin.fromJson(json['coin']); - ogvInfo = json['ogv_info'] == null - ? null - : OgvInfo.fromJson(json['ogv_info']); - progressPercent = (json['progress_percent'] as num?)?.toDouble(); badge = json['badge']?['text']; - forbidFav = json['forbid_fav'] as bool?; - moreType = json['more_type'] as int?; - businessOid = json['business_oid'] as int?; } } diff --git a/lib/models_new/media_list/ogv_info.dart b/lib/models_new/media_list/ogv_info.dart deleted file mode 100644 index d4d0276d4..000000000 --- a/lib/models_new/media_list/ogv_info.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; - -class OgvInfo { - int? epid; - int? seasonId; - int? aid; - int? cid; - Dimension? dimension; - - OgvInfo({this.epid, this.seasonId, this.aid, this.cid, this.dimension}); - - factory OgvInfo.fromJson(Map json) => OgvInfo( - epid: json['epid'] as int?, - seasonId: json['season_id'] as int?, - aid: json['aid'] as int?, - cid: json['cid'] as int?, - dimension: json['dimension'] == null - ? null - : Dimension.fromJson(json['dimension'] as Map), - ); -} diff --git a/lib/models_new/media_list/page.dart b/lib/models_new/media_list/page.dart index a85b978ed..c2e898295 100644 --- a/lib/models_new/media_list/page.dart +++ b/lib/models_new/media_list/page.dart @@ -1,36 +1,11 @@ -import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; - class Page { int? id; - String? title; - String? intro; - int? duration; - String? link; - int? page; - String? from; - Dimension? dimension; Page({ this.id, - this.title, - this.intro, - this.duration, - this.link, - this.page, - this.from, - this.dimension, }); factory Page.fromJson(Map json) => Page( id: json["id"], - title: json["title"], - intro: json["intro"], - duration: json["duration"], - link: json["link"], - page: json["page"], - from: json["from"], - dimension: json["dimension"] == null - ? null - : Dimension.fromJson(json["dimension"]), ); } diff --git a/lib/models_new/media_list/rights.dart b/lib/models_new/media_list/rights.dart deleted file mode 100644 index 278fe7d7c..000000000 --- a/lib/models_new/media_list/rights.dart +++ /dev/null @@ -1,38 +0,0 @@ -class Rights { - int? bp; - int? elec; - int? download; - int? movie; - int? pay; - int? ugcPay; - int? hd5; - int? noReprint; - int? autoplay; - int? noBackground; - - Rights({ - this.bp, - this.elec, - this.download, - this.movie, - this.pay, - this.ugcPay, - this.hd5, - this.noReprint, - this.autoplay, - this.noBackground, - }); - - factory Rights.fromJson(Map json) => Rights( - bp: json['bp'] as int?, - elec: json['elec'] as int?, - download: json['download'] as int?, - movie: json['movie'] as int?, - pay: json['pay'] as int?, - ugcPay: json['ugc_pay'] as int?, - hd5: json['hd5'] as int?, - noReprint: json['no_reprint'] as int?, - autoplay: json['autoplay'] as int?, - noBackground: json['no_background'] as int?, - ); -} diff --git a/lib/models_new/member/coin_like_arc/item.dart b/lib/models_new/member/coin_like_arc/item.dart index cb39e552d..7594e57a0 100644 --- a/lib/models_new/member/coin_like_arc/item.dart +++ b/lib/models_new/member/coin_like_arc/item.dart @@ -1,96 +1,42 @@ class CoinLikeArcItem { String? title; - String? subtitle; - String? tname; String? cover; - String? coverIcon; String? uri; String? param; - String? goto; - String? length; int? duration; - bool? isPopular; bool? isSteins; - bool? isUgcpay; bool? isCooperation; bool? isPgc; - bool? isLivePlayback; - bool? isPugv; - bool? isFold; - bool? isOneself; int? play; int? danmaku; int? ctime; - int? ugcPay; - String? author; - bool? state; - int? videos; - String? viewContent; - int? iconType; - String? publishTimeText; CoinLikeArcItem({ this.title, - this.subtitle, - this.tname, this.cover, - this.coverIcon, this.uri, this.param, - this.goto, - this.length, this.duration, - this.isPopular, this.isSteins, - this.isUgcpay, this.isCooperation, this.isPgc, - this.isLivePlayback, - this.isPugv, - this.isFold, - this.isOneself, this.play, this.danmaku, this.ctime, - this.ugcPay, - this.author, - this.state, - this.videos, - this.viewContent, - this.iconType, - this.publishTimeText, }); factory CoinLikeArcItem.fromJson(Map json) => CoinLikeArcItem( title: json['title'] as String?, - subtitle: json['subtitle'] as String?, - tname: json['tname'] as String?, cover: json['cover'] as String?, - coverIcon: json['cover_icon'] as String?, uri: json['uri'] as String?, param: json['param'] as String?, - goto: json['goto'] as String?, - length: json['length'] as String?, duration: json['duration'] as int?, - isPopular: json['is_popular'] as bool?, isSteins: json['is_steins'] as bool?, - isUgcpay: json['is_ugcpay'] as bool?, isCooperation: json['is_cooperation'] as bool?, isPgc: json['is_pgc'] as bool?, - isLivePlayback: json['is_live_playback'] as bool?, - isPugv: json['is_pugv'] as bool?, - isFold: json['is_fold'] as bool?, - isOneself: json['is_oneself'] as bool?, play: json['play'] as int?, danmaku: json['danmaku'] as int?, ctime: json['ctime'] as int?, - ugcPay: json['ugc_pay'] as int?, - author: json['author'] as String?, - state: json['state'] as bool?, - videos: json['videos'] as int?, - viewContent: json['view_content'] as String?, - iconType: json['icon_type'] as int?, - publishTimeText: json['publish_time_text'] as String?, ); } diff --git a/lib/models_new/member/search_archive/page.dart b/lib/models_new/member/search_archive/page.dart index 4aecc812e..feefb16dc 100644 --- a/lib/models_new/member/search_archive/page.dart +++ b/lib/models_new/member/search_archive/page.dart @@ -1,13 +1,9 @@ class Page { - int? pn; - int? ps; int? count; - Page({this.pn, this.ps, this.count}); + Page({this.count}); factory Page.fromJson(Map json) => Page( - pn: json['pn'] as int?, - ps: json['ps'] as int?, count: json['count'] as int?, ); } diff --git a/lib/models_new/member/season_web/page.dart b/lib/models_new/member/season_web/page.dart index 84f03b43a..748324093 100644 --- a/lib/models_new/member/season_web/page.dart +++ b/lib/models_new/member/season_web/page.dart @@ -1,13 +1,9 @@ class Page { - int? pageNum; - int? pageSize; int? total; - Page({this.pageNum, this.pageSize, this.total}); + Page({this.total}); factory Page.fromJson(Map json) => Page( - pageNum: json['page_num'] ?? json['num'], - pageSize: json['page_size'] ?? json['size'], total: json['total'] as int?, ); } diff --git a/lib/models_new/member_card_info/card.dart b/lib/models_new/member_card_info/card.dart index ec8640362..2a0b30e92 100644 --- a/lib/models_new/member_card_info/card.dart +++ b/lib/models_new/member_card_info/card.dart @@ -4,8 +4,6 @@ class Card { String? mid; String? name; String? face; - int? fans; - int? attention; BaseOfficialVerify? official; Vip? vip; @@ -13,8 +11,6 @@ class Card { this.mid, this.name, this.face, - this.fans, - this.attention, this.official, this.vip, }); @@ -23,8 +19,6 @@ class Card { mid: json['mid'] as String?, name: json['name'] as String?, face: json['face'] as String?, - fans: json['fans'] as int?, - attention: json['attention'] as int?, official: json['Official'] == null ? null : BaseOfficialVerify.fromJson( diff --git a/lib/models_new/member_card_info/data.dart b/lib/models_new/member_card_info/data.dart index 81b68f812..cf8fb1d12 100644 --- a/lib/models_new/member_card_info/data.dart +++ b/lib/models_new/member_card_info/data.dart @@ -2,19 +2,13 @@ import 'package:PiliPlus/models_new/member_card_info/card.dart'; class MemberCardInfoData { Card? card; - bool? following; int? archiveCount; - int? articleCount; int? follower; - int? likeNum; MemberCardInfoData({ this.card, - this.following, this.archiveCount, - this.articleCount, this.follower, - this.likeNum, }); factory MemberCardInfoData.fromJson(Map json) => @@ -22,10 +16,7 @@ class MemberCardInfoData { card: json['card'] == null ? null : Card.fromJson(json['card'] as Map), - following: json['following'] as bool?, archiveCount: json['archive_count'] as int?, - articleCount: json['article_count'] as int?, follower: json['follower'] as int?, - likeNum: json['like_num'] as int?, ); } diff --git a/lib/models_new/msg/im_user_infos/datum.dart b/lib/models_new/msg/im_user_infos/datum.dart index b994dbdec..9d641ae63 100644 --- a/lib/models_new/msg/im_user_infos/datum.dart +++ b/lib/models_new/msg/im_user_infos/datum.dart @@ -3,58 +3,28 @@ import 'package:PiliPlus/models/model_avatar.dart'; class ImUserInfosData { int? mid; String? name; - String? sex; String? face; String? sign; - int? rank; - int? level; - int? silence; Vip? vip; Pendant? pendant; BaseOfficialVerify? official; - int? birthday; - int? isFakeAccount; - int? isDeleted; - int? inRegAudit; - int? faceNft; - int? faceNftNew; - int? isSeniorMember; - String? digitalId; - int? digitalType; ImUserInfosData({ this.mid, this.name, - this.sex, this.face, this.sign, - this.rank, - this.level, - this.silence, this.vip, this.pendant, this.official, - this.birthday, - this.isFakeAccount, - this.isDeleted, - this.inRegAudit, - this.faceNft, - this.faceNftNew, - this.isSeniorMember, - this.digitalId, - this.digitalType, }); factory ImUserInfosData.fromJson(Map json) => ImUserInfosData( mid: json['mid'] as int?, name: json['name'] as String?, - sex: json['sex'] as String?, face: json['face'] as String?, sign: json['sign'] as String?, - rank: json['rank'] as int?, - level: json['level'] as int?, - silence: json['silence'] as int?, vip: json['vip'] == null ? null : Vip.fromJson(json['vip'] as Map), @@ -66,14 +36,5 @@ class ImUserInfosData { : BaseOfficialVerify.fromJson( json['official'] as Map, ), - birthday: json['birthday'] as int?, - isFakeAccount: json['is_fake_account'] as int?, - isDeleted: json['is_deleted'] as int?, - inRegAudit: json['in_reg_audit'] as int?, - faceNft: json['face_nft'] as int?, - faceNftNew: json['face_nft_new'] as int?, - isSeniorMember: json['is_senior_member'] as int?, - digitalId: json['digital_id'] as String?, - digitalType: json['digital_type'] as int?, ); } diff --git a/lib/models_new/msg/msg_at/content.dart b/lib/models_new/msg/msg_at/content.dart index 82cfd65c9..5741b16b6 100644 --- a/lib/models_new/msg/msg_at/content.dart +++ b/lib/models_new/msg/msg_at/content.dart @@ -1,53 +1,20 @@ class MsgAtContent { - String? type; String? business; - int? businessId; - String? title; String? image; - String? uri; - int? subjectId; - int? rootId; - int? targetId; - int? sourceId; String? sourceContent; String? nativeUri; - List? atDetails; - List? topicDetails; - bool? hideReplyButton; MsgAtContent({ - this.type, this.business, - this.businessId, - this.title, this.image, - this.uri, - this.subjectId, - this.rootId, - this.targetId, - this.sourceId, this.sourceContent, this.nativeUri, - this.atDetails, - this.topicDetails, - this.hideReplyButton, }); factory MsgAtContent.fromJson(Map json) => MsgAtContent( - type: json['type'] as String?, business: json['business'] as String?, - businessId: json['business_id'] as int?, - title: json['title'] as String?, image: json['image'] as String?, - uri: json['uri'] as String?, - subjectId: json['subject_id'] as int?, - rootId: json['root_id'] as int?, - targetId: json['target_id'] as int?, - sourceId: json['source_id'] as int?, sourceContent: json['source_content'] as String?, nativeUri: json['native_uri'] as String?, - atDetails: json['at_details'] as List?, - topicDetails: json['topic_details'] as List?, - hideReplyButton: json['hide_reply_button'] as bool?, ); } diff --git a/lib/models_new/msg/msg_at/user.dart b/lib/models_new/msg/msg_at/user.dart index 46f7a6f77..f99cadc24 100644 --- a/lib/models_new/msg/msg_at/user.dart +++ b/lib/models_new/msg/msg_at/user.dart @@ -1,26 +1,17 @@ class User { int? mid; - int? fans; String? nickname; String? avatar; - String? midLink; - bool? follow; User({ this.mid, - this.fans, this.nickname, this.avatar, - this.midLink, - this.follow, }); factory User.fromJson(Map json) => User( mid: json['mid'] as int?, - fans: json['fans'] as int?, nickname: json['nickname'] as String?, avatar: json['avatar'] as String?, - midLink: json['mid_link'] as String?, - follow: json['follow'] as bool?, ); } diff --git a/lib/models_new/msg/msg_dnd/uid_setting.dart b/lib/models_new/msg/msg_dnd/uid_setting.dart index 27c2c08a7..d7d9f8c2c 100644 --- a/lib/models_new/msg/msg_dnd/uid_setting.dart +++ b/lib/models_new/msg/msg_dnd/uid_setting.dart @@ -1,11 +1,9 @@ class UidSetting { - int? id; int? setting; - UidSetting({this.id, this.setting}); + UidSetting({this.setting}); factory UidSetting.fromJson(Map json) => UidSetting( - id: json['id'] as int?, setting: json['setting'] as int?, ); } diff --git a/lib/models_new/msg/msg_like/content.dart b/lib/models_new/msg/msg_like/content.dart index 9b37a4d14..cae1dd7e9 100644 --- a/lib/models_new/msg/msg_like/content.dart +++ b/lib/models_new/msg/msg_like/content.dart @@ -1,52 +1,22 @@ class MsgLikeContent { - int? itemId; - int? pid; - String? type; String? business; - int? businessId; - int? replyBusinessId; - int? likeBusinessId; String? title; - String? desc; String? image; - String? uri; - String? detailName; String? nativeUri; - int? ctime; MsgLikeContent({ - this.itemId, - this.pid, - this.type, this.business, - this.businessId, - this.replyBusinessId, - this.likeBusinessId, this.title, - this.desc, this.image, - this.uri, - this.detailName, this.nativeUri, - this.ctime, }); factory MsgLikeContent.fromJson(Map json) { return MsgLikeContent( - itemId: json['item_id'] as int?, - pid: json['pid'] as int?, - type: json['type'] as String?, business: json['business'] as String?, - businessId: json['business_id'] as int?, - replyBusinessId: json['reply_business_id'] as int?, - likeBusinessId: json['like_business_id'] as int?, title: json['title'] as String?, - desc: json['desc'] as String?, image: json['image'] as String?, - uri: json['uri'] as String?, - detailName: json['detail_name'] as String?, nativeUri: json['native_uri'] as String?, - ctime: json['ctime'] as int?, ); } } diff --git a/lib/models_new/msg/msg_like/user.dart b/lib/models_new/msg/msg_like/user.dart index 46f7a6f77..13308329e 100644 --- a/lib/models_new/msg/msg_like/user.dart +++ b/lib/models_new/msg/msg_like/user.dart @@ -1,26 +1,14 @@ class User { - int? mid; - int? fans; String? nickname; String? avatar; - String? midLink; - bool? follow; User({ - this.mid, - this.fans, this.nickname, this.avatar, - this.midLink, - this.follow, }); factory User.fromJson(Map json) => User( - mid: json['mid'] as int?, - fans: json['fans'] as int?, nickname: json['nickname'] as String?, avatar: json['avatar'] as String?, - midLink: json['mid_link'] as String?, - follow: json['follow'] as bool?, ); } diff --git a/lib/models_new/msg/msg_like_detail/card.dart b/lib/models_new/msg/msg_like_detail/card.dart index fdd9f39e2..fb02bac57 100644 --- a/lib/models_new/msg/msg_like_detail/card.dart +++ b/lib/models_new/msg/msg_like_detail/card.dart @@ -1,51 +1,15 @@ class MsgLikeDetailCard { - int? itemId; - int? pid; - String? type; String? business; - int? businessId; - int? replyBusinessId; - int? likeBusinessId; String? title; - String? desc; - String? image; - String? uri; - String? detailName; - String? nativeUri; - int? ctime; MsgLikeDetailCard({ - this.itemId, - this.pid, - this.type, this.business, - this.businessId, - this.replyBusinessId, - this.likeBusinessId, this.title, - this.desc, - this.image, - this.uri, - this.detailName, - this.nativeUri, - this.ctime, }); factory MsgLikeDetailCard.fromJson(Map json) => MsgLikeDetailCard( - itemId: json['item_id'] as int?, - pid: json['pid'] as int?, - type: json['type'] as String?, business: json['business'] as String?, - businessId: json['business_id'] as int?, - replyBusinessId: json['reply_business_id'] as int?, - likeBusinessId: json['like_business_id'] as int?, title: json['title'] as String?, - desc: json['desc'] as String?, - image: json['image'] as String?, - uri: json['uri'] as String?, - detailName: json['detail_name'] as String?, - nativeUri: json['native_uri'] as String?, - ctime: json['ctime'] as int?, ); } diff --git a/lib/models_new/msg/msg_like_detail/user.dart b/lib/models_new/msg/msg_like_detail/user.dart index 273362a89..ce0730c2e 100644 --- a/lib/models_new/msg/msg_like_detail/user.dart +++ b/lib/models_new/msg/msg_like_detail/user.dart @@ -1,27 +1,18 @@ class MsgLikeDetailUser { int? mid; - int? fans; String? nickname; String? avatar; - String? midLink; - bool? follow; MsgLikeDetailUser({ this.mid, - this.fans, this.nickname, this.avatar, - this.midLink, - this.follow, }); factory MsgLikeDetailUser.fromJson(Map json) => MsgLikeDetailUser( mid: json['mid'] as int?, - fans: json['fans'] as int?, nickname: json['nickname'] as String?, avatar: json['avatar'] as String?, - midLink: json['mid_link'] as String?, - follow: json['follow'] as bool?, ); } diff --git a/lib/models_new/msg/msg_reply/content.dart b/lib/models_new/msg/msg_reply/content.dart index c278950f2..2a4d57f0d 100644 --- a/lib/models_new/msg/msg_reply/content.dart +++ b/lib/models_new/msg/msg_reply/content.dart @@ -1,79 +1,31 @@ class MsgReplyContent { int? subjectId; - int? rootId; - int? sourceId; - int? targetId; - String? type; int? businessId; String? business; - String? title; - String? desc; - String? image; - String? uri; String? nativeUri; - String? detailTitle; String? rootReplyContent; String? sourceContent; String? targetReplyContent; - List? atDetails; - List? topicDetails; - bool? hideReplyButton; - bool? hideLikeButton; - int? likeState; - dynamic danmu; - String? message; MsgReplyContent({ this.subjectId, - this.rootId, - this.sourceId, - this.targetId, - this.type, this.businessId, this.business, - this.title, - this.desc, - this.image, - this.uri, this.nativeUri, - this.detailTitle, this.rootReplyContent, this.sourceContent, this.targetReplyContent, - this.atDetails, - this.topicDetails, - this.hideReplyButton, - this.hideLikeButton, - this.likeState, - this.danmu, - this.message, }); factory MsgReplyContent.fromJson(Map json) { return MsgReplyContent( subjectId: json['subject_id'] as int?, - rootId: json['root_id'] as int?, - sourceId: json['source_id'] as int?, - targetId: json['target_id'] as int?, - type: json['type'] as String?, businessId: json['business_id'] as int?, business: json['business'] as String?, - title: json['title'] as String?, - desc: json['desc'] as String?, - image: json['image'] as String?, - uri: json['uri'] as String?, nativeUri: json['native_uri'] as String?, - detailTitle: json['detail_title'] as String?, rootReplyContent: json['root_reply_content'] as String?, sourceContent: json['source_content'] as String?, targetReplyContent: json['target_reply_content'] as String?, - atDetails: json['at_details'] as List?, - topicDetails: json['topic_details'] as List?, - hideReplyButton: json['hide_reply_button'] as bool?, - hideLikeButton: json['hide_like_button'] as bool?, - likeState: json['like_state'] as int?, - danmu: json['danmu'] as dynamic, - message: json['message'] as String?, ); } } diff --git a/lib/models_new/msg/msg_reply/user.dart b/lib/models_new/msg/msg_reply/user.dart index 46f7a6f77..f99cadc24 100644 --- a/lib/models_new/msg/msg_reply/user.dart +++ b/lib/models_new/msg/msg_reply/user.dart @@ -1,26 +1,17 @@ class User { int? mid; - int? fans; String? nickname; String? avatar; - String? midLink; - bool? follow; User({ this.mid, - this.fans, this.nickname, this.avatar, - this.midLink, - this.follow, }); factory User.fromJson(Map json) => User( mid: json['mid'] as int?, - fans: json['fans'] as int?, nickname: json['nickname'] as String?, avatar: json['avatar'] as String?, - midLink: json['mid_link'] as String?, - follow: json['follow'] as bool?, ); } diff --git a/lib/models_new/msg/msg_sys/data.dart b/lib/models_new/msg/msg_sys/data.dart index a3c2f0e9f..74fce1777 100644 --- a/lib/models_new/msg/msg_sys/data.dart +++ b/lib/models_new/msg/msg_sys/data.dart @@ -1,56 +1,23 @@ import 'dart:convert'; -import 'package:PiliPlus/models_new/msg/msg_sys/publisher.dart'; -import 'package:PiliPlus/models_new/msg/msg_sys/source.dart'; - class MsgSysItem { int? id; int? cursor; - Publisher? publisher; - int? type; String? title; String? content; - Source? source; String? timeAt; - int? cardType; - String? cardBrief; - String? cardMsgBrief; - String? cardCover; - String? cardStoryTitle; - String? cardLink; - String? mc; - int? isStation; - int? isSend; - int? notifyCursor; MsgSysItem({ this.id, this.cursor, - this.publisher, - this.type, this.title, this.content, - this.source, this.timeAt, - this.cardType, - this.cardBrief, - this.cardMsgBrief, - this.cardCover, - this.cardStoryTitle, - this.cardLink, - this.mc, - this.isStation, - this.isSend, - this.notifyCursor, }); MsgSysItem.fromJson(Map json) { id = json['id'] as int?; cursor = json['cursor'] as int?; - publisher = json['publisher'] == null - ? null - : Publisher.fromJson(json['publisher'] as Map); - type = json['type'] as int?; title = json['title'] as String?; content = json['content'] as String?; if (content != null) { @@ -61,19 +28,6 @@ class MsgSysItem { } } catch (_) {} } - source = json['source'] == null - ? null - : Source.fromJson(json['source'] as Map); timeAt = json['time_at'] as String?; - cardType = json['card_type'] as int?; - cardBrief = json['card_brief'] as String?; - cardMsgBrief = json['card_msg_brief'] as String?; - cardCover = json['card_cover'] as String?; - cardStoryTitle = json['card_story_title'] as String?; - cardLink = json['card_link'] as String?; - mc = json['mc'] as String?; - isStation = json['is_station'] as int?; - isSend = json['is_send'] as int?; - notifyCursor = json['notify_cursor'] as int?; } } diff --git a/lib/models_new/msg/msg_sys/publisher.dart b/lib/models_new/msg/msg_sys/publisher.dart deleted file mode 100644 index aa8233cef..000000000 --- a/lib/models_new/msg/msg_sys/publisher.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Publisher { - String? name; - int? mid; - String? face; - - Publisher({this.name, this.mid, this.face}); - - factory Publisher.fromJson(Map json) => Publisher( - name: json['name'] as String?, - mid: json['mid'] as int?, - face: json['face'] as String?, - ); -} diff --git a/lib/models_new/msg/msg_sys/source.dart b/lib/models_new/msg/msg_sys/source.dart deleted file mode 100644 index cc53af09c..000000000 --- a/lib/models_new/msg/msg_sys/source.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Source { - String? name; - String? logo; - - Source({this.name, this.logo}); - - factory Source.fromJson(Map json) => Source( - name: json['name'] as String?, - logo: json['logo'] as String?, - ); -} diff --git a/lib/models_new/msg/msgfeed_unread.dart b/lib/models_new/msg/msgfeed_unread.dart index 671c70e95..47c4d4c1e 100644 --- a/lib/models_new/msg/msgfeed_unread.dart +++ b/lib/models_new/msg/msgfeed_unread.dart @@ -1,4 +1,4 @@ -import 'package:fixnum/fixnum.dart'; +import 'package:fixnum/fixnum.dart' show Int64; class MsgFeedUnread { int at = 0; diff --git a/lib/models_new/msg/session_ss/data.dart b/lib/models_new/msg/session_ss/data.dart index 9bd03d490..822d726ab 100644 --- a/lib/models_new/msg/session_ss/data.dart +++ b/lib/models_new/msg/session_ss/data.dart @@ -1,19 +1,16 @@ class SessionSsData { int? followStatus; - int? special; int? pushSetting; int? showPushSetting; SessionSsData({ this.followStatus, - this.special, this.pushSetting, this.showPushSetting, }); factory SessionSsData.fromJson(Map json) => SessionSsData( followStatus: json['follow_status'] as int?, - special: json['special'] as int?, pushSetting: json['push_setting'] as int?, showPushSetting: json['show_push_setting'] as int?, ); diff --git a/lib/models_new/msgfeed_unread/data.dart b/lib/models_new/msgfeed_unread/data.dart index ac0536801..02ad72ce4 100644 --- a/lib/models_new/msgfeed_unread/data.dart +++ b/lib/models_new/msgfeed_unread/data.dart @@ -1,42 +1,21 @@ class MsgFeedUnreadData { int at; - int coin; - int danmu; - int favorite; int like; - int recvLike; - int recvReply; int reply; int sysMsg; - int sysMsgStyle; - int up; MsgFeedUnreadData({ required this.at, - required this.coin, - required this.danmu, - required this.favorite, required this.like, - required this.recvLike, - required this.recvReply, required this.reply, required this.sysMsg, - required this.sysMsgStyle, - required this.up, }); factory MsgFeedUnreadData.fromJson(Map json) => MsgFeedUnreadData( at: json['at'] ?? 0, - coin: json['coin'] ?? 0, - danmu: json['danmu'] ?? 0, - favorite: json['favorite'] ?? 0, like: json['like'] ?? 0, - recvLike: json['recv_like'] ?? 0, - recvReply: json['recv_reply'] ?? 0, reply: json['reply'] ?? 0, sysMsg: json['sys_msg'] ?? 0, - sysMsgStyle: json['sys_msg_style'] ?? 0, - up: json['up'] ?? 0, ); } diff --git a/lib/models_new/music/bgm_detail.dart b/lib/models_new/music/bgm_detail.dart index 053c757b5..be9fe3496 100644 --- a/lib/models_new/music/bgm_detail.dart +++ b/lib/models_new/music/bgm_detail.dart @@ -1,5 +1,4 @@ import 'package:PiliPlus/models/model_owner.dart'; -import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class MusicDetail { MusicDetail({ @@ -9,40 +8,18 @@ class MusicDetail { required this.mvAid, required this.mvCid, required this.mvBvid, - required this.mvIndexOrder, - required this.mvFav, - required this.mvLikes, - required this.mvShares, required this.mvCover, - required this.bgColor, - required this.mvLyric, - required this.supportListen, required this.wishListen, required this.wishCount, - required this.musicShares, required this.musicSource, required this.album, - required this.artists, required this.artistsList, required this.listenPv, - required this.achievement, required this.musicRank, - required this.maxListId, - required this.showChosen, required this.hotSongHeat, - required this.hotSongRank, - required this.creationRank, - required this.musicOutUrl, - // required this.abTest, required this.musicComment, - // required this.musicMaterial, - required this.isNextgenActivity, - required this.isOriginal, - required this.musicHot, required this.musicRelation, required this.musicPublish, - // required this.musicAchievementTimeline, - required this.flowAttr, }); final String? musicTitle; @@ -51,40 +28,18 @@ class MusicDetail { final int? mvAid; final int? mvCid; final String? mvBvid; - final int? mvIndexOrder; - final int? mvFav; - final int? mvLikes; - final int? mvShares; final String? mvCover; - final String? bgColor; - final String? mvLyric; - final bool? supportListen; bool? wishListen; int? wishCount; - final int? musicShares; final String? musicSource; final String? album; - final List? artists; final List? artistsList; final int? listenPv; - final List? achievement; final String? musicRank; - final int? maxListId; - final bool? showChosen; final HotSongHeat? hotSongHeat; - final Rank? hotSongRank; - final Rank? creationRank; - final String? musicOutUrl; - // final dynamic abTest; final MusicComment? musicComment; - // final dynamic musicMaterial; - final int? isNextgenActivity; - final int? isOriginal; - final int? musicHot; final int? musicRelation; final String? musicPublish; - // final List? musicAchievementTimeline; - final FlowAttr? flowAttr; factory MusicDetail.fromJson(Map json) { return MusicDetail( @@ -94,121 +49,33 @@ class MusicDetail { mvAid: json["mv_aid"], mvCid: json["mv_cid"], mvBvid: json["mv_bvid"], - mvIndexOrder: json["mv_index_order"], - mvFav: json["mv_fav"], - mvLikes: json["mv_likes"], - mvShares: json["mv_shares"], mvCover: json["mv_cover"], - bgColor: json["bg_color"], - mvLyric: json["mv_lyric"], - supportListen: json["support_listen"], wishListen: json["wish_listen"], wishCount: json["wish_count"], - musicShares: json["music_shares"], musicSource: json["music_source"], album: json["album"], - artists: (json["artists"] as List?) - ?.map((x) => Artist.fromJson(x)) - .toList(), artistsList: (json["artists_list"] as List?) ?.map((x) => Artist.fromJson(x)) .toList(), listenPv: json["listen_pv"], - achievement: (json["achievement"] as List?)?.fromCast(), musicRank: json["music_rank"], - maxListId: json["max_list_id"], - showChosen: json["show_chosen"], hotSongHeat: json["hot_song_heat"] == null ? null : HotSongHeat.fromJson(json["hot_song_heat"]), - hotSongRank: json["hot_song_rank"] == null - ? null - : Rank.fromJson(json["hot_song_rank"]), - creationRank: json["creation_rank"] == null - ? null - : Rank.fromJson(json["creation_rank"]), - musicOutUrl: json["music_out_url"], musicComment: json["music_comment"] == null ? null : MusicComment.fromJson(json["music_comment"]), - isNextgenActivity: json["is_nextgen_activity"], - isOriginal: json["is_original"], - musicHot: json["music_hot"], musicRelation: json["music_relation"], musicPublish: json["music_publish"], - flowAttr: json["flow_attr"] == null - ? null - : FlowAttr.fromJson(json["flow_attr"]), ); } } class Artist extends Owner { String? identity; - int? identifyType; Artist.fromJson(Map json) : super.fromJson(json) { identity = json["identity"]; - identifyType = json["identify_type"]; - } -} - -class Rank { - Rank({ - required this.lastUpdate, - required this.highestRank, - required this.onListTimes, - required this.listDetail, - }); - - final int? lastUpdate; - final int? highestRank; - final int? onListTimes; - final List? listDetail; - - factory Rank.fromJson(Map json) { - return Rank( - lastUpdate: json["last_update"], - highestRank: json["highest_rank"], - onListTimes: json["on_list_times"], - listDetail: (json["list_detail"] as List?) - ?.map((x) => ListDetail.fromJson(x)) - .toList(), - ); - } -} - -class ListDetail { - ListDetail({ - required this.date, - required this.rank, - }); - - final int? date; - final int? rank; - - factory ListDetail.fromJson(Map json) { - return ListDetail( - date: json["date"], - rank: json["rank"], - ); - } -} - -class FlowAttr { - FlowAttr({ - required this.noShare, - required this.noComment, - }); - - final bool? noShare; - final bool? noComment; - - factory FlowAttr.fromJson(Map json) { - return FlowAttr( - noShare: json["no_share"], - noComment: json["no_comment"], - ); } } @@ -250,20 +117,17 @@ class SongHeat { class MusicComment { MusicComment({ - required this.state, required this.nums, required this.oid, required this.pageType, }); - final int? state; final int? nums; final int? oid; final int? pageType; factory MusicComment.fromJson(Map json) { return MusicComment( - state: json["state"], nums: json["nums"], oid: json["oid"], pageType: json["page_type"], diff --git a/lib/models_new/music/bgm_recommend_list.dart b/lib/models_new/music/bgm_recommend_list.dart index ea84b28d9..dc52e871d 100644 --- a/lib/models_new/music/bgm_recommend_list.dart +++ b/lib/models_new/music/bgm_recommend_list.dart @@ -1,109 +1,39 @@ class BgmRecommend { BgmRecommend({ - required this.aid, required this.bvid, - required this.indexOrder, required this.cid, required this.cover, required this.title, - required this.mid, required this.upNickName, required this.play, - required this.vt, - required this.isVt, required this.danmu, required this.duration, - required this.label, required this.labelList, - required this.isTop, - required this.showType, - required this.clickType, - required this.jumpUrl, - required this.vtDisplay, - required this.aidSource, - required this.tid, - required this.subTid, - required this.subTagName, - required this.coverMark, - // required this.districtLabel, }); - final int? aid; final String? bvid; - final int? indexOrder; final int? cid; final String? cover; final String? title; - final int? mid; final String? upNickName; final int? play; - final int? vt; - final int? isVt; final int? danmu; final int? duration; - final String? label; final List? labelList; - final bool? isTop; - final int? showType; - final int? clickType; - final String? jumpUrl; - final String? vtDisplay; - final int? aidSource; - final int? tid; - final int? subTid; - final String? subTagName; - final CoverMark? coverMark; - // final dynamic districtLabel; factory BgmRecommend.fromJson(Map json) { return BgmRecommend( - aid: json["aid"], bvid: json["bvid"], - indexOrder: json["index_order"], cid: json["cid"], cover: json["cover"], title: json["title"], - mid: json["mid"], upNickName: json["up_nick_name"], play: json["play"], - vt: json["vt"], - isVt: json["is_vt"], danmu: json["danmu"], duration: json["duration"], - label: json["label"], labelList: (json["label_list"] as List?) ?.map((x) => LabelList.fromJson(x)) .toList(), - isTop: json["is_top"], - showType: json["show_type"], - clickType: json["click_type"], - jumpUrl: json["jump_url"], - vtDisplay: json["vt_display"], - aidSource: json["aid_source"], - tid: json["tid"], - subTid: json["sub_tid"], - subTagName: json["sub_tag_name"], - coverMark: json["cover_mark"] == null - ? null - : CoverMark.fromJson(json["cover_mark"]), - // districtLabel: json["district_label"], - ); - } -} - -class CoverMark { - CoverMark({ - required this.name, - required this.value, - }); - - final String? name; - final String? value; - - factory CoverMark.fromJson(Map json) { - return CoverMark( - name: json["name"], - value: json["value"], ); } } @@ -111,16 +41,13 @@ class CoverMark { class LabelList { LabelList({ required this.name, - required this.value, }); final String? name; - final int? value; factory LabelList.fromJson(Map json) { return LabelList( name: json["name"], - value: json["value"], ); } } diff --git a/lib/models_new/pgc/pgc_index_result/badge_info.dart b/lib/models_new/pgc/pgc_index_result/badge_info.dart deleted file mode 100644 index a5c15c028..000000000 --- a/lib/models_new/pgc/pgc_index_result/badge_info.dart +++ /dev/null @@ -1,13 +0,0 @@ -class BadgeInfo { - String? bgColor; - String? bgColorNight; - String? text; - - BadgeInfo({this.bgColor, this.bgColorNight, this.text}); - - factory BadgeInfo.fromJson(Map json) => BadgeInfo( - bgColor: json['bg_color'] as String?, - bgColorNight: json['bg_color_night'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_index_result/data.dart b/lib/models_new/pgc/pgc_index_result/data.dart index 45b565e54..dea4f7ee5 100644 --- a/lib/models_new/pgc/pgc_index_result/data.dart +++ b/lib/models_new/pgc/pgc_index_result/data.dart @@ -3,19 +3,13 @@ import 'package:PiliPlus/models_new/pgc/pgc_index_result/list.dart'; class PgcIndexResult { int? hasNext; List? list; - int? num; - int? size; - int? total; - PgcIndexResult({this.hasNext, this.list, this.num, this.size, this.total}); + PgcIndexResult({this.hasNext, this.list}); factory PgcIndexResult.fromJson(Map json) => PgcIndexResult( hasNext: json['has_next'] as int?, list: (json['list'] as List?) ?.map((e) => PgcIndexItem.fromJson(e as Map)) .toList(), - num: json['num'] as int?, - size: json['size'] as int?, - total: json['total'] as int?, ); } diff --git a/lib/models_new/pgc/pgc_index_result/first_ep.dart b/lib/models_new/pgc/pgc_index_result/first_ep.dart deleted file mode 100644 index 8b449bf65..000000000 --- a/lib/models_new/pgc/pgc_index_result/first_ep.dart +++ /dev/null @@ -1,11 +0,0 @@ -class FirstEp { - String? cover; - int? epId; - - FirstEp({this.cover, this.epId}); - - factory FirstEp.fromJson(Map json) => FirstEp( - cover: json['cover'] as String?, - epId: json['ep_id'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_index_result/list.dart b/lib/models_new/pgc/pgc_index_result/list.dart index 59d41004d..ffb4b7f83 100644 --- a/lib/models_new/pgc/pgc_index_result/list.dart +++ b/lib/models_new/pgc/pgc_index_result/list.dart @@ -1,69 +1,26 @@ -import 'package:PiliPlus/models_new/pgc/pgc_index_result/badge_info.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_index_result/first_ep.dart'; - class PgcIndexItem { String? badge; - BadgeInfo? badgeInfo; - int? badgeType; String? cover; - FirstEp? firstEp; String? indexShow; - int? isFinish; - String? link; - int? mediaId; String? order; - String? orderType; - String? score; int? seasonId; - int? seasonStatus; - int? seasonType; - String? subTitle; String? title; - String? titleIcon; PgcIndexItem({ this.badge, - this.badgeInfo, - this.badgeType, this.cover, - this.firstEp, this.indexShow, - this.isFinish, - this.link, - this.mediaId, this.order, - this.orderType, - this.score, this.seasonId, - this.seasonStatus, - this.seasonType, - this.subTitle, this.title, - this.titleIcon, }); factory PgcIndexItem.fromJson(Map json) => PgcIndexItem( badge: json['badge'] as String?, - badgeInfo: json['badge_info'] == null - ? null - : BadgeInfo.fromJson(json['badge_info'] as Map), - badgeType: json['badge_type'] as int?, cover: json['cover'] as String?, - firstEp: json['first_ep'] == null - ? null - : FirstEp.fromJson(json['first_ep'] as Map), indexShow: json['index_show'] as String?, - isFinish: json['is_finish'] as int?, - link: json['link'] as String?, - mediaId: json['media_id'] as int?, order: json['order'] as String?, - orderType: json['order_type'] as String?, - score: json['score'] as String?, seasonId: json['season_id'] as int?, - seasonStatus: json['season_status'] as int?, - seasonType: json['season_type'] as int?, - subTitle: json['subTitle'] as String?, title: json['title'] as String?, - titleIcon: json['title_icon'] as String?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/activity.dart b/lib/models_new/pgc/pgc_info_model/activity.dart deleted file mode 100644 index 99fce2371..000000000 --- a/lib/models_new/pgc/pgc_info_model/activity.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Activity { - String? headBgUrl; - int? id; - String? title; - - Activity({this.headBgUrl, this.id, this.title}); - - factory Activity.fromJson(Map json) => Activity( - headBgUrl: json['head_bg_url'] as String?, - id: json['id'] as int?, - title: json['title'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/area.dart b/lib/models_new/pgc/pgc_info_model/area.dart index 8540bf56f..a4524f174 100644 --- a/lib/models_new/pgc/pgc_info_model/area.dart +++ b/lib/models_new/pgc/pgc_info_model/area.dart @@ -1,11 +1,9 @@ class Area { - int? id; String? name; - Area({this.id, this.name}); + Area({this.name}); factory Area.fromJson(Map json) => Area( - id: json['id'] as int?, name: json['name'] as String?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/badge_info.dart b/lib/models_new/pgc/pgc_info_model/badge_info.dart deleted file mode 100644 index a5c15c028..000000000 --- a/lib/models_new/pgc/pgc_info_model/badge_info.dart +++ /dev/null @@ -1,13 +0,0 @@ -class BadgeInfo { - String? bgColor; - String? bgColorNight; - String? text; - - BadgeInfo({this.bgColor, this.bgColorNight, this.text}); - - factory BadgeInfo.fromJson(Map json) => BadgeInfo( - bgColor: json['bg_color'] as String?, - bgColorNight: json['bg_color_night'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/danmaku.dart b/lib/models_new/pgc/pgc_info_model/danmaku.dart deleted file mode 100644 index b5bef5ae4..000000000 --- a/lib/models_new/pgc/pgc_info_model/danmaku.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Danmaku { - String? icon; - String? pureText; - String? text; - int? value; - - Danmaku({this.icon, this.pureText, this.text, this.value}); - - factory Danmaku.fromJson(Map json) => Danmaku( - icon: json['icon'] as String?, - pureText: json['pure_text'] as String?, - text: json['text'] as String?, - value: json['value'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/ed.dart b/lib/models_new/pgc/pgc_info_model/ed.dart deleted file mode 100644 index cb828732d..000000000 --- a/lib/models_new/pgc/pgc_info_model/ed.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Ed { - int? end; - int? start; - - Ed({this.end, this.start}); - - factory Ed.fromJson(Map json) => Ed( - end: json['end'] as int?, - start: json['start'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/episode.dart b/lib/models_new/pgc/pgc_info_model/episode.dart index 32740790f..2aef6b470 100644 --- a/lib/models_new/pgc/pgc_info_model/episode.dart +++ b/lib/models_new/pgc/pgc_info_model/episode.dart @@ -1,78 +1,43 @@ -import 'package:PiliPlus/models_new/pgc/pgc_info_model/badge_info.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/rights.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/skip.dart'; import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; import 'package:PiliPlus/models_new/video/video_detail/episode.dart' show BaseEpisodeItem; class EpisodeItem extends BaseEpisodeItem { - BadgeInfo? badgeInfo; - int? badgeType; Dimension? dimension; int? duration; // pgc: millisec , pugv: sec - bool? enableVt; String? from; - bool? isViewHide; String? link; String? longTitle; int? pubTime; - int? pv; - // String? releaseDate; - Rights? rights; - int? sectionType; String? shareCopy; String? shareUrl; - String? shortLink; - bool? showDrmLoginDialog; String? showTitle; - Skip? skip; - int? status; - String? subtitle; - String? vid; int? play; EpisodeItem({ super.aid, super.badge, - this.badgeInfo, - this.badgeType, super.bvid, super.cid, super.cover, this.dimension, this.duration, - this.enableVt, super.epId, this.from, super.id, - this.isViewHide, this.link, this.longTitle, this.pubTime, - this.pv, - // this.releaseDate, - this.rights, - this.sectionType, this.shareCopy, this.shareUrl, - this.shortLink, - this.showDrmLoginDialog, this.showTitle, - this.skip, - this.status, - this.subtitle, super.title, - this.vid, this.play, }); factory EpisodeItem.fromJson(Map json) => EpisodeItem( aid: json['aid'] as int?, badge: json['badge'] as String?, - badgeInfo: json['badge_info'] == null - ? null - : BadgeInfo.fromJson(json['badge_info'] as Map), - badgeType: json['badge_type'] as int?, bvid: json['bvid'] as String?, cid: json['cid'] as int?, cover: json['cover'] as String?, @@ -80,32 +45,16 @@ class EpisodeItem extends BaseEpisodeItem { ? null : Dimension.fromJson(json['dimension'] as Map), duration: json['duration'] as int?, - enableVt: json['enable_vt'] as bool?, epId: json['ep_id'] as int?, from: json['from'] as String?, id: json['id'] as int?, - isViewHide: json['is_view_hide'] as bool?, link: json['link'] as String?, longTitle: json['long_title'] as String?, pubTime: json['pub_time'] ?? json['release_date'], - pv: json['pv'] as int?, - // releaseDate: json['release_date'] as String?, - rights: json['rights'] == null - ? null - : Rights.fromJson(json['rights'] as Map), - sectionType: json['section_type'] as int?, shareCopy: json['share_copy'] as String?, shareUrl: json['share_url'] as String?, - shortLink: json['short_link'] as String?, - showDrmLoginDialog: json['showDrmLoginDialog'] as bool?, showTitle: json['show_title'] as String?, - skip: json['skip'] == null - ? null - : Skip.fromJson(json['skip'] as Map), - status: json['status'] as int?, - subtitle: json['subtitle'] as String?, title: json['title'] as String?, - vid: json['vid'] as String?, play: json['play'] as int?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/icon_font.dart b/lib/models_new/pgc/pgc_info_model/icon_font.dart deleted file mode 100644 index 0c5e2d35c..000000000 --- a/lib/models_new/pgc/pgc_info_model/icon_font.dart +++ /dev/null @@ -1,11 +0,0 @@ -class IconFont { - String? name; - String? text; - - IconFont({this.name, this.text}); - - factory IconFont.fromJson(Map json) => IconFont( - name: json['name'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/new_ep.dart b/lib/models_new/pgc/pgc_info_model/new_ep.dart index a11fcb57e..39dbc6b2f 100644 --- a/lib/models_new/pgc/pgc_info_model/new_ep.dart +++ b/lib/models_new/pgc/pgc_info_model/new_ep.dart @@ -1,15 +1,11 @@ class NewEp { String? desc; - int? id; - int? isNew; String? title; - NewEp({this.desc, this.id, this.isNew, this.title}); + NewEp({this.desc, this.title}); factory NewEp.fromJson(Map json) => NewEp( desc: json['desc'] as String?, - id: json['id'] as int?, - isNew: json['is_new'] as int?, title: json['title'] as String?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/op.dart b/lib/models_new/pgc/pgc_info_model/op.dart deleted file mode 100644 index fa1170b35..000000000 --- a/lib/models_new/pgc/pgc_info_model/op.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Op { - int? end; - int? start; - - Op({this.end, this.start}); - - factory Op.fromJson(Map json) => Op( - end: json['end'] as int?, - start: json['start'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/publish.dart b/lib/models_new/pgc/pgc_info_model/publish.dart index 065cad121..82eb2278c 100644 --- a/lib/models_new/pgc/pgc_info_model/publish.dart +++ b/lib/models_new/pgc/pgc_info_model/publish.dart @@ -1,26 +1,11 @@ class Publish { - int? isFinish; - int? isStarted; - String? pubTime; String? pubTimeShow; - int? unknowPubDate; - int? weekday; Publish({ - this.isFinish, - this.isStarted, - this.pubTime, this.pubTimeShow, - this.unknowPubDate, - this.weekday, }); factory Publish.fromJson(Map json) => Publish( - isFinish: json['is_finish'] as int?, - isStarted: json['is_started'] as int?, - pubTime: json['pub_time'] as String?, pubTimeShow: json['pub_time_show'] as String?, - unknowPubDate: json['unknow_pub_date'] as int?, - weekday: json['weekday'] as int?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/rating.dart b/lib/models_new/pgc/pgc_info_model/rating.dart index 0f082f86d..56af2a182 100644 --- a/lib/models_new/pgc/pgc_info_model/rating.dart +++ b/lib/models_new/pgc/pgc_info_model/rating.dart @@ -1,11 +1,9 @@ class Rating { - int? count; double? score; - Rating({this.count, this.score}); + Rating({this.score}); factory Rating.fromJson(Map json) => Rating( - count: json['count'] as int?, score: (json['score'] as num?)?.toDouble(), ); } diff --git a/lib/models_new/pgc/pgc_info_model/result.dart b/lib/models_new/pgc/pgc_info_model/result.dart index 7d529e5e5..29bdab3d3 100644 --- a/lib/models_new/pgc/pgc_info_model/result.dart +++ b/lib/models_new/pgc/pgc_info_model/result.dart @@ -1,57 +1,31 @@ -import 'package:PiliPlus/models_new/pgc/pgc_info_model/activity.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/area.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/brief.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/cooperator.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/episode.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/icon_font.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/new_ep.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/publish.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/rating.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/rights.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/season.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/section.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/series.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/stat.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/up_info.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/user_status.dart'; class PgcInfoModel { - Activity? activity; String? actors; - String? alias; List? areas; - String? bkgCover; String? cover; - bool? enableVt; List? episodes; String? evaluate; - int? hideEpVvVtDm; - IconFont? iconFont; - String? jpTitle; - String? link; int? mediaId; - int? mode; NewEp? newEp; Publish? publish; Rating? rating; - String? record; - Rights? rights; int? seasonId; String? seasonTitle; - List? seasons; List
? section; - Series? series; - String? shareCopy; - String? shareSubTitle; - String? shareUrl; - int? showSeasonType; - String? squareCover; - String? staff; PgcStat? stat; - int? status; String? subtitle; String? title; - int? total; int? type; UpInfo? upInfo; UserStatus? userStatus; @@ -59,42 +33,21 @@ class PgcInfoModel { Brief? brief; PgcInfoModel({ - this.activity, this.actors, - this.alias, this.areas, - this.bkgCover, this.cover, - this.enableVt, this.episodes, this.evaluate, - this.hideEpVvVtDm, - this.iconFont, - this.jpTitle, - this.link, this.mediaId, - this.mode, this.newEp, this.publish, this.rating, - this.record, - this.rights, this.seasonId, this.seasonTitle, - this.seasons, this.section, - this.series, - this.shareCopy, - this.shareSubTitle, - this.shareUrl, - this.showSeasonType, - this.squareCover, - this.staff, this.stat, - this.status, this.subtitle, this.title, - this.total, this.type, this.upInfo, this.userStatus, @@ -103,29 +56,16 @@ class PgcInfoModel { }); factory PgcInfoModel.fromJson(Map json) => PgcInfoModel( - activity: json['activity'] == null - ? null - : Activity.fromJson(json['activity'] as Map), actors: json['actors'] as String?, - alias: json['alias'] as String?, areas: (json['areas'] as List?) ?.map((e) => Area.fromJson(e as Map)) .toList(), - bkgCover: json['bkg_cover'] as String?, cover: json['cover'] as String?, - enableVt: json['enable_vt'] as bool?, episodes: (json['episodes'] as List?) ?.map((e) => EpisodeItem.fromJson(e as Map)) .toList(), evaluate: json['evaluate'] as String?, - hideEpVvVtDm: json['hide_ep_vv_vt_dm'] as int?, - iconFont: json['icon_font'] == null - ? null - : IconFont.fromJson(json['icon_font'] as Map), - jpTitle: json['jp_title'] as String?, - link: json['link'] as String?, mediaId: json['media_id'] as int?, - mode: json['mode'] as int?, newEp: json['new_ep'] == null ? null : NewEp.fromJson(json['new_ep'] as Map), @@ -135,34 +75,16 @@ class PgcInfoModel { rating: json['rating'] == null ? null : Rating.fromJson(json['rating'] as Map), - record: json['record'] as String?, - rights: json['rights'] == null - ? null - : Rights.fromJson(json['rights'] as Map), seasonId: json['season_id'] as int?, seasonTitle: json['season_title'] as String?, - seasons: (json['seasons'] as List?) - ?.map((e) => Season.fromJson(e as Map)) - .toList(), section: (json['section'] as List?) ?.map((e) => Section.fromJson(e as Map)) .toList(), - series: json['series'] == null - ? null - : Series.fromJson(json['series'] as Map), - shareCopy: json['share_copy'] as String?, - shareSubTitle: json['share_sub_title'] as String?, - shareUrl: json['share_url'] as String?, - showSeasonType: json['show_season_type'] as int?, - squareCover: json['square_cover'] as String?, - staff: json['staff'] as String?, stat: json['stat'] == null ? null : PgcStat.fromJson(json['stat'] as Map), - status: json['status'] as int?, subtitle: json['subtitle'] as String?, title: json['title'] as String?, - total: json['total'] as int?, type: json['type'] as int?, upInfo: json['up_info'] == null ? null diff --git a/lib/models_new/pgc/pgc_info_model/rights.dart b/lib/models_new/pgc/pgc_info_model/rights.dart deleted file mode 100644 index 2f70a13d1..000000000 --- a/lib/models_new/pgc/pgc_info_model/rights.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Rights { - int? allowDm; - int? allowDownload; - int? areaLimit; - - Rights({this.allowDm, this.allowDownload, this.areaLimit}); - - factory Rights.fromJson(Map json) => Rights( - allowDm: json['allow_dm'] as int?, - allowDownload: json['allow_download'] as int?, - areaLimit: json['area_limit'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/season.dart b/lib/models_new/pgc/pgc_info_model/season.dart deleted file mode 100644 index abd72e956..000000000 --- a/lib/models_new/pgc/pgc_info_model/season.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:PiliPlus/models_new/pgc/pgc_info_model/badge_info.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/icon_font.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/new_ep.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/stat.dart'; - -class Season { - String? badge; - BadgeInfo? badgeInfo; - int? badgeType; - String? cover; - bool? enableVt; - String? horizontalCover1610; - String? horizontalCover169; - IconFont? iconFont; - int? mediaId; - NewEp? newEp; - int? seasonId; - String? seasonTitle; - int? seasonType; - PgcStat? stat; - - Season({ - this.badge, - this.badgeInfo, - this.badgeType, - this.cover, - this.enableVt, - this.horizontalCover1610, - this.horizontalCover169, - this.iconFont, - this.mediaId, - this.newEp, - this.seasonId, - this.seasonTitle, - this.seasonType, - this.stat, - }); - - factory Season.fromJson(Map json) => Season( - badge: json['badge'] as String?, - badgeInfo: json['badge_info'] == null - ? null - : BadgeInfo.fromJson(json['badge_info'] as Map), - badgeType: json['badge_type'] as int?, - cover: json['cover'] as String?, - enableVt: json['enable_vt'] as bool?, - horizontalCover1610: json['horizontal_cover_1610'] as String?, - horizontalCover169: json['horizontal_cover_169'] as String?, - iconFont: json['icon_font'] == null - ? null - : IconFont.fromJson(json['icon_font'] as Map), - mediaId: json['media_id'] as int?, - newEp: json['new_ep'] == null - ? null - : NewEp.fromJson(json['new_ep'] as Map), - seasonId: json['season_id'] as int?, - seasonTitle: json['season_title'] as String?, - seasonType: json['season_type'] as int?, - stat: json['stat'] == null - ? null - : PgcStat.fromJson(json['stat'] as Map), - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/section.dart b/lib/models_new/pgc/pgc_info_model/section.dart index ad208740d..65ef7447f 100644 --- a/lib/models_new/pgc/pgc_info_model/section.dart +++ b/lib/models_new/pgc/pgc_info_model/section.dart @@ -1,36 +1,15 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/episode.dart'; class Section { - int? attr; - int? episodeId; - List? episodeIds; List? episodes; - int? id; - String? title; - int? type; - int? type2; Section({ - this.attr, - this.episodeId, - this.episodeIds, this.episodes, - this.id, - this.title, - this.type, - this.type2, }); factory Section.fromJson(Map json) => Section( - attr: json['attr'] as int?, - episodeId: json['episode_id'] as int?, - episodeIds: json['episode_ids'] as List?, episodes: (json['episodes'] as List?) ?.map((e) => EpisodeItem.fromJson(e as Map)) .toList(), - id: json['id'] as int?, - title: json['title'] as String?, - type: json['type'] as int?, - type2: json['type2'] as int?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/series.dart b/lib/models_new/pgc/pgc_info_model/series.dart deleted file mode 100644 index a359d21b7..000000000 --- a/lib/models_new/pgc/pgc_info_model/series.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Series { - int? displayType; - int? seriesId; - String? seriesTitle; - - Series({this.displayType, this.seriesId, this.seriesTitle}); - - factory Series.fromJson(Map json) => Series( - displayType: json['display_type'] as int?, - seriesId: json['series_id'] as int?, - seriesTitle: json['series_title'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/skip.dart b/lib/models_new/pgc/pgc_info_model/skip.dart deleted file mode 100644 index 106e098cd..000000000 --- a/lib/models_new/pgc/pgc_info_model/skip.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:PiliPlus/models_new/pgc/pgc_info_model/ed.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/op.dart'; - -class Skip { - Ed? ed; - Op? op; - - Skip({this.ed, this.op}); - - factory Skip.fromJson(Map json) => Skip( - ed: json['ed'] == null - ? null - : Ed.fromJson(json['ed'] as Map), - op: json['op'] == null - ? null - : Op.fromJson(json['op'] as Map), - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/stat.dart b/lib/models_new/pgc/pgc_info_model/stat.dart index 2faa627e5..913f8761d 100644 --- a/lib/models_new/pgc/pgc_info_model/stat.dart +++ b/lib/models_new/pgc/pgc_info_model/stat.dart @@ -1,19 +1,13 @@ import 'package:PiliPlus/models_new/video/video_detail/stat_detail.dart'; class PgcStat extends StatDetail { - int? favorites; - String? followText; - PgcStat.fromJson(Map json) { coin = json["coins"] ?? 0; danmaku = json["danmakus"]; favorite = json["favorite"] ?? 0; - favorites = json["favorites"]; - followText = json["follow_text"]; like = json["likes"] ?? 0; reply = json["reply"]; share = json["share"]; view = json["views"]; - vt = json["vt"]; } } diff --git a/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart b/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart deleted file mode 100644 index f8c420480..000000000 --- a/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:PiliPlus/models_new/pgc/pgc_info_model/danmaku.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_info_model/vt.dart'; - -class StatForUnity { - num? coin; - Danmaku? danmaku; - int? likes; - int? reply; - Vt? vt; - - StatForUnity({this.coin, this.danmaku, this.likes, this.reply, this.vt}); - - factory StatForUnity.fromJson(Map json) => StatForUnity( - coin: json['coin'] as num?, - danmaku: json['danmaku'] == null - ? null - : Danmaku.fromJson(json['danmaku'] as Map), - likes: json['likes'] as int?, - reply: json['reply'] as int?, - vt: json['vt'] == null - ? null - : Vt.fromJson(json['vt'] as Map), - ); -} diff --git a/lib/models_new/pgc/pgc_info_model/up_info.dart b/lib/models_new/pgc/pgc_info_model/up_info.dart index 2f2f57e29..fc5644414 100644 --- a/lib/models_new/pgc/pgc_info_model/up_info.dart +++ b/lib/models_new/pgc/pgc_info_model/up_info.dart @@ -1,41 +1,17 @@ class UpInfo { String? avatar; - String? avatarSubscriptUrl; - int? follower; - int? isFollow; int? mid; - String? nicknameColor; - int? themeType; String? uname; - int? verifyType; - int? vipStatus; - int? vipType; UpInfo({ this.avatar, - this.avatarSubscriptUrl, - this.follower, - this.isFollow, this.mid, - this.nicknameColor, - this.themeType, this.uname, - this.verifyType, - this.vipStatus, - this.vipType, }); factory UpInfo.fromJson(Map json) => UpInfo( avatar: json['avatar'] as String?, - avatarSubscriptUrl: json['avatar_subscript_url'] as String?, - follower: json['follower'] as int?, - isFollow: json['is_follow'] as int?, mid: json['mid'] as int?, - nicknameColor: json['nickname_color'] as String?, - themeType: json['theme_type'] as int?, uname: json['uname'] as String?, - verifyType: json['verify_type'] as int?, - vipStatus: json['vip_status'] as int?, - vipType: json['vip_type'] as int?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/user_progress.dart b/lib/models_new/pgc/pgc_info_model/user_progress.dart index 7cc426e0c..759a0d05a 100644 --- a/lib/models_new/pgc/pgc_info_model/user_progress.dart +++ b/lib/models_new/pgc/pgc_info_model/user_progress.dart @@ -1,15 +1,11 @@ class UserProgress { UserProgress({ this.lastEpId, - this.lastEpIndex, - this.lastTime, }); + int? lastEpId; - String? lastEpIndex; - int? lastTime; + UserProgress.fromJson(Map json) { lastEpId = json['last_ep_id']; - lastEpIndex = json['last_ep_index']; - lastTime = json['last_time']; } } diff --git a/lib/models_new/pgc/pgc_info_model/user_status.dart b/lib/models_new/pgc/pgc_info_model/user_status.dart index 488066fc7..0abf35972 100644 --- a/lib/models_new/pgc/pgc_info_model/user_status.dart +++ b/lib/models_new/pgc/pgc_info_model/user_status.dart @@ -1,39 +1,15 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/user_progress.dart'; class UserStatus { - int? areaLimit; - int? banAreaShow; - int? follow; - int? followStatus; - int? login; - int? pay; - int? payPackPaid; - int? sponsor; UserProgress? progress; int? favored; UserStatus({ - this.areaLimit, - this.banAreaShow, - this.follow, - this.followStatus, - this.login, - this.pay, - this.payPackPaid, - this.sponsor, this.progress, this.favored, }); factory UserStatus.fromJson(Map json) => UserStatus( - areaLimit: json['area_limit'] as int?, - banAreaShow: json['ban_area_show'] as int?, - follow: json['follow'] as int?, - followStatus: json['follow_status'] as int?, - login: json['login'] as int?, - pay: json['pay'] as int?, - payPackPaid: json['pay_pack_paid'] as int?, - sponsor: json['sponsor'] as int?, progress: json['progress'] == null ? null : UserProgress.fromJson(json['progress']), diff --git a/lib/models_new/pgc/pgc_info_model/vt.dart b/lib/models_new/pgc/pgc_info_model/vt.dart deleted file mode 100644 index c1b0a4bfa..000000000 --- a/lib/models_new/pgc/pgc_info_model/vt.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Vt { - String? icon; - String? pureText; - String? text; - int? value; - - Vt({this.icon, this.pureText, this.text, this.value}); - - factory Vt.fromJson(Map json) => Vt( - icon: json['icon'] as String?, - pureText: json['pure_text'] as String?, - text: json['text'] as String?, - value: json['value'] as int?, - ); -} diff --git a/lib/models_new/pgc/pgc_rank/badge_info.dart b/lib/models_new/pgc/pgc_rank/badge_info.dart deleted file mode 100644 index a5c15c028..000000000 --- a/lib/models_new/pgc/pgc_rank/badge_info.dart +++ /dev/null @@ -1,13 +0,0 @@ -class BadgeInfo { - String? bgColor; - String? bgColorNight; - String? text; - - BadgeInfo({this.bgColor, this.bgColorNight, this.text}); - - factory BadgeInfo.fromJson(Map json) => BadgeInfo( - bgColor: json['bg_color'] as String?, - bgColorNight: json['bg_color_night'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_rank/icon_font.dart b/lib/models_new/pgc/pgc_rank/icon_font.dart deleted file mode 100644 index 0c5e2d35c..000000000 --- a/lib/models_new/pgc/pgc_rank/icon_font.dart +++ /dev/null @@ -1,11 +0,0 @@ -class IconFont { - String? name; - String? text; - - IconFont({this.name, this.text}); - - factory IconFont.fromJson(Map json) => IconFont( - name: json['name'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_rank/new_ep.dart b/lib/models_new/pgc/pgc_rank/new_ep.dart index 37c5c1bf7..6fcb7d9cd 100644 --- a/lib/models_new/pgc/pgc_rank/new_ep.dart +++ b/lib/models_new/pgc/pgc_rank/new_ep.dart @@ -1,11 +1,9 @@ class NewEp { - String? cover; String? indexShow; - NewEp({this.cover, this.indexShow}); + NewEp({this.indexShow}); factory NewEp.fromJson(Map json) => NewEp( - cover: json['cover'] as String?, indexShow: json['index_show'] as String?, ); } diff --git a/lib/models_new/pgc/pgc_rank/pgc_rank_item_model.dart b/lib/models_new/pgc/pgc_rank/pgc_rank_item_model.dart index 5d3cd39bf..377fea23c 100644 --- a/lib/models_new/pgc/pgc_rank/pgc_rank_item_model.dart +++ b/lib/models_new/pgc/pgc_rank/pgc_rank_item_model.dart @@ -1,38 +1,16 @@ -import 'package:PiliPlus/models_new/pgc/pgc_rank/badge_info.dart'; -import 'package:PiliPlus/models_new/pgc/pgc_rank/icon_font.dart'; import 'package:PiliPlus/models_new/pgc/pgc_rank/new_ep.dart'; import 'package:PiliPlus/models_new/pgc/pgc_rank/stat.dart'; class PgcRankItemModel { - String? badge; - BadgeInfo? badgeInfo; - int? badgeType; String? cover; - String? desc; - bool? enableVt; - IconFont? iconFont; NewEp? newEp; - int? rank; - String? rating; - int? seasonId; - String? ssHorizontalCover; Stat? stat; String? title; String? url; PgcRankItemModel({ - this.badge, - this.badgeInfo, - this.badgeType, this.cover, - this.desc, - this.enableVt, - this.iconFont, this.newEp, - this.rank, - this.rating, - this.seasonId, - this.ssHorizontalCover, this.stat, this.title, this.url, @@ -40,24 +18,10 @@ class PgcRankItemModel { factory PgcRankItemModel.fromJson(Map json) => PgcRankItemModel( - badge: json['badge'] as String?, - badgeInfo: json['badge_info'] == null - ? null - : BadgeInfo.fromJson(json['badge_info'] as Map), - badgeType: json['badge_type'] as int?, cover: json['cover'] as String?, - desc: json['desc'] as String?, - enableVt: json['enable_vt'] as bool?, - iconFont: json['icon_font'] == null - ? null - : IconFont.fromJson(json['icon_font'] as Map), newEp: json['new_ep'] == null ? null : NewEp.fromJson(json['new_ep'] as Map), - rank: json['rank'] as int?, - rating: json['rating'] as String?, - seasonId: json['season_id'] as int?, - ssHorizontalCover: json['ss_horizontal_cover'] as String?, stat: json['stat'] == null ? null : Stat.fromJson(json['stat'] as Map), diff --git a/lib/models_new/pgc/pgc_rank/stat.dart b/lib/models_new/pgc/pgc_rank/stat.dart index 0a06129ac..5550df480 100644 --- a/lib/models_new/pgc/pgc_rank/stat.dart +++ b/lib/models_new/pgc/pgc_rank/stat.dart @@ -1,15 +1,11 @@ class Stat { - int? danmaku; int? follow; - int? seriesFollow; int? view; - Stat({this.danmaku, this.follow, this.seriesFollow, this.view}); + Stat({this.follow, this.view}); factory Stat.fromJson(Map json) => Stat( - danmaku: json['danmaku'] as int?, follow: (json['follow'] as int?) ?? 0, - seriesFollow: json['series_follow'] as int?, view: (json['view'] as int?) ?? 0, ); } diff --git a/lib/models_new/pgc/pgc_review/list.dart b/lib/models_new/pgc/pgc_review/list.dart index 16fcdd0a7..f7e921f92 100644 --- a/lib/models_new/pgc/pgc_review/list.dart +++ b/lib/models_new/pgc/pgc_review/list.dart @@ -5,11 +5,6 @@ class PgcReviewItemModel { Author? author; String? title; String? content; - int? ctime; - int? mediaId; - int? mid; - int? mtime; - String? progress; String? pushTimeStr; int? reviewId; late int score; @@ -20,11 +15,6 @@ class PgcReviewItemModel { this.author, this.title, this.content, - this.ctime, - this.mediaId, - this.mid, - this.mtime, - this.progress, this.pushTimeStr, this.reviewId, required this.score, @@ -40,11 +30,6 @@ class PgcReviewItemModel { : Author.fromJson(json['author'] as Map), title: json['title'] as String?, content: json['content'] as String?, - ctime: json['ctime'] as int?, - mediaId: json['media_id'] as int?, - mid: json['mid'] as int?, - mtime: json['mtime'] as int?, - progress: json['progress'] as String?, pushTimeStr: json['push_time_str'] as String?, reviewId: json['review_id'] as int?, score: json['score'] == null ? 0 : json['score'] ~/ 2, diff --git a/lib/models_new/pgc/pgc_timeline/episode.dart b/lib/models_new/pgc/pgc_timeline/episode.dart index 417c6d175..4c2ba0ef1 100644 --- a/lib/models_new/pgc/pgc_timeline/episode.dart +++ b/lib/models_new/pgc/pgc_timeline/episode.dart @@ -1,69 +1,29 @@ -import 'package:PiliPlus/models_new/pgc/pgc_timeline/icon_font.dart'; - class Episode { String? cover; - int? delay; - int? delayId; - String? delayIndex; - String? delayReason; - bool? enableVt; - String? epCover; int? episodeId; int? follow; - String? follows; - IconFont? iconFont; - String? plays; String? pubIndex; String? pubTime; - int? pubTs; - int? published; int? seasonId; - String? squareCover; String? title; Episode({ this.cover, - this.delay, - this.delayId, - this.delayIndex, - this.delayReason, - this.enableVt, - this.epCover, this.episodeId, this.follow, - this.follows, - this.iconFont, - this.plays, this.pubIndex, this.pubTime, - this.pubTs, - this.published, this.seasonId, - this.squareCover, this.title, }); factory Episode.fromJson(Map json) => Episode( cover: json['cover'] as String?, - delay: json['delay'] as int?, - delayId: json['delay_id'] as int?, - delayIndex: json['delay_index'] as String?, - delayReason: json['delay_reason'] as String?, - enableVt: json['enable_vt'] as bool?, - epCover: json['ep_cover'] as String?, episodeId: json['episode_id'] as int?, follow: json['follow'] as int?, - follows: json['follows'] as String?, - iconFont: json['icon_font'] == null - ? null - : IconFont.fromJson(json['icon_font'] as Map), - plays: json['plays'] as String?, pubIndex: json['pub_index'] as String?, pubTime: json['pub_time'] as String?, - pubTs: json['pub_ts'] as int?, - published: json['published'] as int?, seasonId: json['season_id'] as int?, - squareCover: json['square_cover'] as String?, title: json['title'] as String?, ); } diff --git a/lib/models_new/pgc/pgc_timeline/icon_font.dart b/lib/models_new/pgc/pgc_timeline/icon_font.dart deleted file mode 100644 index 0c5e2d35c..000000000 --- a/lib/models_new/pgc/pgc_timeline/icon_font.dart +++ /dev/null @@ -1,11 +0,0 @@ -class IconFont { - String? name; - String? text; - - IconFont({this.name, this.text}); - - factory IconFont.fromJson(Map json) => IconFont( - name: json['name'] as String?, - text: json['text'] as String?, - ); -} diff --git a/lib/models_new/pgc/pgc_timeline/pgc_timeline.dart b/lib/models_new/pgc/pgc_timeline/pgc_timeline.dart index e6275b7e0..6581fba5f 100644 --- a/lib/models_new/pgc/pgc_timeline/pgc_timeline.dart +++ b/lib/models_new/pgc/pgc_timeline/pgc_timeline.dart @@ -1,15 +1,11 @@ import 'package:PiliPlus/models_new/pgc/pgc_timeline/result.dart'; class PgcTimeline { - int? code; - String? message; List? result; - PgcTimeline({this.code, this.message, this.result}); + PgcTimeline({this.result}); factory PgcTimeline.fromJson(Map json) => PgcTimeline( - code: json['code'] as int?, - message: json['message'] as String?, result: (json['result'] as List?) ?.map((e) => TimelineResult.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/popular/popular_precious/data.dart b/lib/models_new/popular/popular_precious/data.dart index 1be3efe06..b7e8642f8 100644 --- a/lib/models_new/popular/popular_precious/data.dart +++ b/lib/models_new/popular/popular_precious/data.dart @@ -1,18 +1,14 @@ import 'package:PiliPlus/models/model_hot_video_item.dart'; class PopularPreciousData { - String? title; int? mediaId; - String? explain; List? list; - PopularPreciousData({this.title, this.mediaId, this.explain, this.list}); + PopularPreciousData({this.mediaId, this.list}); factory PopularPreciousData.fromJson(Map json) => PopularPreciousData( - title: json['title'] as String?, mediaId: json['media_id'] as int?, - explain: json['explain'] as String?, list: (json['list'] as List?) ?.map((e) => HotVideoItemModel.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/popular/popular_series_list/list.dart b/lib/models_new/popular/popular_series_list/list.dart index e9e5ec4fd..98bc2aa23 100644 --- a/lib/models_new/popular/popular_series_list/list.dart +++ b/lib/models_new/popular/popular_series_list/list.dart @@ -1,16 +1,12 @@ class PopularSeriesListItem { int? number; - String? subject; - int? status; String? name; - PopularSeriesListItem({this.number, this.subject, this.status, this.name}); + PopularSeriesListItem({this.number, this.name}); factory PopularSeriesListItem.fromJson(Map json) => PopularSeriesListItem( number: json['number'] as int?, - subject: json['subject'] as String?, - status: json['status'] as int?, name: json['name'] as String?, ); } diff --git a/lib/models_new/popular/popular_series_one/config.dart b/lib/models_new/popular/popular_series_one/config.dart index ec0d7b72c..bd1fcc1e0 100644 --- a/lib/models_new/popular/popular_series_one/config.dart +++ b/lib/models_new/popular/popular_series_one/config.dart @@ -1,54 +1,18 @@ class PopularSeriesConfig { - int? id; - String? type; - int? number; - String? subject; - int? stime; - int? etime; - int? status; String? name; String? label; - String? hint; - int? color; - String? cover; - String? shareTitle; - String? shareSubtitle; int? mediaId; PopularSeriesConfig({ - this.id, - this.type, - this.number, - this.subject, - this.stime, - this.etime, - this.status, this.name, this.label, - this.hint, - this.color, - this.cover, - this.shareTitle, - this.shareSubtitle, this.mediaId, }); factory PopularSeriesConfig.fromJson(Map json) => PopularSeriesConfig( - id: json['id'] as int?, - type: json['type'] as String?, - number: json['number'] as int?, - subject: json['subject'] as String?, - stime: json['stime'] as int?, - etime: json['etime'] as int?, - status: json['status'] as int?, name: json['name'] as String?, label: json['label'] as String?, - hint: json['hint'] as String?, - color: json['color'] as int?, - cover: json['cover'] as String?, - shareTitle: json['share_title'] as String?, - shareSubtitle: json['share_subtitle'] as String?, mediaId: json['media_id'] as int?, ); } diff --git a/lib/models_new/relation/data.dart b/lib/models_new/relation/data.dart index 1a061965e..9acaec43d 100644 --- a/lib/models_new/relation/data.dart +++ b/lib/models_new/relation/data.dart @@ -1,14 +1,12 @@ import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class RelationData { - int? mid; int? attribute; int? mtime; List? tag; int? special; RelationData({ - this.mid, this.attribute, this.mtime, this.tag, @@ -16,7 +14,6 @@ class RelationData { }); factory RelationData.fromJson(Map json) => RelationData( - mid: json['mid'] as int?, attribute: json['attribute'] as int?, mtime: json['mtime'] as int?, tag: (json['tag'] as List?)?.fromCast(), diff --git a/lib/models_new/search/search_trending/list.dart b/lib/models_new/search/search_trending/list.dart index df3ed440f..8e4ac1a66 100644 --- a/lib/models_new/search/search_trending/list.dart +++ b/lib/models_new/search/search_trending/list.dart @@ -1,13 +1,11 @@ class SearchTrendingItemModel { String? keyword; - String? showName; String? icon; bool? showLiveIcon; String? recommendReason; SearchTrendingItemModel({ this.keyword, - this.showName, this.icon, this.showLiveIcon, this.recommendReason, @@ -16,7 +14,6 @@ class SearchTrendingItemModel { factory SearchTrendingItemModel.fromJson(Map json) => SearchTrendingItemModel( keyword: json['keyword'] as String?, - showName: json['show_name'] as String?, icon: json['icon'] as String?, showLiveIcon: json['show_live_icon'] as bool?, recommendReason: (json['recommend_reason'] as String?)?.replaceFirst( diff --git a/lib/models_new/space/space/archive.dart b/lib/models_new/space/space/archive.dart index 7e0d4bc7f..fc053ac4e 100644 --- a/lib/models_new/space/space/archive.dart +++ b/lib/models_new/space/space/archive.dart @@ -1,21 +1,14 @@ -import 'package:PiliPlus/models_new/space/space/episodic_button.dart'; import 'package:PiliPlus/models_new/space/space/order.dart'; import 'package:PiliPlus/models_new/space/space_archive/item.dart'; class Archive { - EpisodicButton? episodicButton; List? order; int? count; List? item; - Archive({this.episodicButton, this.order, this.count, this.item}); + Archive({this.order, this.count, this.item}); factory Archive.fromJson(Map json) => Archive( - episodicButton: json['episodic_button'] == null - ? null - : EpisodicButton.fromJson( - json['episodic_button'] as Map, - ), order: (json['order'] as List?) ?.map((e) => Order.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/space/space/attention_tip.dart b/lib/models_new/space/space/attention_tip.dart deleted file mode 100644 index 7e75236d2..000000000 --- a/lib/models_new/space/space/attention_tip.dart +++ /dev/null @@ -1,11 +0,0 @@ -class AttentionTip { - int? cardNum; - String? tip; - - AttentionTip({this.cardNum, this.tip}); - - factory AttentionTip.fromJson(Map json) => AttentionTip( - cardNum: json['card_num'] as int?, - tip: json['tip'] as String?, - ); -} diff --git a/lib/models_new/space/space/author.dart b/lib/models_new/space/space/author.dart deleted file mode 100644 index 4eda4c594..000000000 --- a/lib/models_new/space/space/author.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:PiliPlus/models/model_avatar.dart'; -import 'package:PiliPlus/models_new/space/space/nameplate.dart'; -import 'package:PiliPlus/models_new/space/space/official_verify.dart'; - -class Author { - int? mid; - String? name; - String? face; - Pendant? pendant; - OfficialVerify? officialVerify; - Nameplate? nameplate; - Vip? vip; - - Author({ - this.mid, - this.name, - this.face, - this.pendant, - this.officialVerify, - this.nameplate, - this.vip, - }); - - factory Author.fromJson(Map json) => Author( - mid: json['mid'] as int?, - name: json['name'] as String?, - face: json['face'] as String?, - pendant: json['pendant'] == null - ? null - : Pendant.fromJson(json['pendant'] as Map), - officialVerify: json['official_verify'] == null - ? null - : OfficialVerify.fromJson( - json['official_verify'] as Map, - ), - nameplate: json['nameplate'] == null - ? null - : Nameplate.fromJson(json['nameplate'] as Map), - vip: json['vip'] == null - ? null - : Vip.fromJson(json['vip'] as Map), - ); -} diff --git a/lib/models_new/space/space/badge.dart b/lib/models_new/space/space/badge.dart deleted file mode 100644 index 8e814f817..000000000 --- a/lib/models_new/space/space/badge.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Badge { - String? text; - String? textColor; - String? textColorNight; - String? bgColor; - String? bgColorNight; - String? borderColor; - String? borderColorNight; - int? bgStyle; - - Badge({ - this.text, - this.textColor, - this.textColorNight, - this.bgColor, - this.bgColorNight, - this.borderColor, - this.borderColorNight, - this.bgStyle, - }); - - factory Badge.fromJson(Map json) => Badge( - text: json['text'] as String?, - textColor: json['text_color'] as String?, - textColorNight: json['text_color_night'] as String?, - bgColor: json['bg_color'] as String?, - bgColorNight: json['bg_color_night'] as String?, - borderColor: json['border_color'] as String?, - borderColorNight: json['border_color_night'] as String?, - bgStyle: json['bg_style'] as int?, - ); -} diff --git a/lib/models_new/space/space/button.dart b/lib/models_new/space/space/button.dart deleted file mode 100644 index 3f1f813a5..000000000 --- a/lib/models_new/space/space/button.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Button { - int? type; - String? text; - String? jumpUrl; - - Button({this.type, this.text, this.jumpUrl}); - - factory Button.fromJson(Map json) => Button( - type: json['type'] as int?, - text: json['text'] as String?, - jumpUrl: json['jump_url'] as String?, - ); -} diff --git a/lib/models_new/space/space/card.dart b/lib/models_new/space/space/card.dart index 0504e4362..5553f71f3 100644 --- a/lib/models_new/space/space/card.dart +++ b/lib/models_new/space/space/card.dart @@ -1,42 +1,28 @@ import 'package:PiliPlus/models/model_avatar.dart'; import 'package:PiliPlus/models_new/space/space/achieve.dart'; -import 'package:PiliPlus/models_new/space/space/entrance.dart'; import 'package:PiliPlus/models_new/space/space/followings_followed_upper.dart'; -import 'package:PiliPlus/models_new/space/space/honours.dart'; import 'package:PiliPlus/models_new/space/space/level_info.dart'; import 'package:PiliPlus/models_new/space/space/likes.dart'; import 'package:PiliPlus/models_new/space/space/live_fans_wearing.dart'; -import 'package:PiliPlus/models_new/space/space/nameplate.dart'; -import 'package:PiliPlus/models_new/space/space/nft_certificate.dart'; import 'package:PiliPlus/models_new/space/space/official_verify.dart'; import 'package:PiliPlus/models_new/space/space/pr_info.dart'; -import 'package:PiliPlus/models_new/space/space/profession_verify.dart'; import 'package:PiliPlus/models_new/space/space/relation.dart'; import 'package:PiliPlus/models_new/space/space/space_tag.dart'; class SpaceCard { String? mid; String? name; - bool? approve; - String? rank; String? face; - String? displayRank; int? regtime; - int? spacesta; String? birthday; - String? place; - String? description; int? article; - dynamic attentions; int? fans; int? friend; int? attention; String? sign; LevelInfo? levelInfo; Pendant? pendant; - Nameplate? nameplate; OfficialVerify? officialVerify; - ProfessionVerify? professionVerify; Vip? vip; int? silence; int? endTime; @@ -44,45 +30,25 @@ class SpaceCard { Likes? likes; Achieve? achieve; SpaceRelation? relation; - int? isDeleted; - Honours? honours; LiveFansWearing? liveFansWearing; List? spaceTag; - int? faceNftNew; - bool? hasFaceNft; - NftCertificate? nftCertificate; - Entrance? entrance; - String? nftId; - dynamic nftFaceIcon; - String? digitalId; - int? digitalType; - bool? hasDigitalAsset; SpacePrInfo? prInfo; FollowingsFollowedUpper? followingsFollowedUpper; SpaceCard({ this.mid, this.name, - this.approve, - this.rank, this.face, - this.displayRank, this.regtime, - this.spacesta, this.birthday, - this.place, - this.description, this.article, - this.attentions, this.fans, this.friend, this.attention, this.sign, this.levelInfo, this.pendant, - this.nameplate, this.officialVerify, - this.professionVerify, this.vip, this.silence, this.endTime, @@ -90,19 +56,8 @@ class SpaceCard { this.likes, this.achieve, this.relation, - this.isDeleted, - this.honours, this.liveFansWearing, this.spaceTag, - this.faceNftNew, - this.hasFaceNft, - this.nftCertificate, - this.entrance, - this.nftId, - this.nftFaceIcon, - this.digitalId, - this.digitalType, - this.hasDigitalAsset, this.prInfo, this.followingsFollowedUpper, }); @@ -110,17 +65,10 @@ class SpaceCard { factory SpaceCard.fromJson(Map json) => SpaceCard( mid: json['mid'] as String?, name: json['name'] as String?, - approve: json['approve'] as bool?, - rank: json['rank'] as String?, face: json['face'] as String?, - displayRank: json['DisplayRank'] as String?, regtime: json['regtime'] as int?, - spacesta: json['spacesta'] as int?, birthday: json['birthday'] as String?, - place: json['place'] as String?, - description: json['description'] as String?, article: json['article'] as int?, - attentions: json['attentions'] as dynamic, fans: json['fans'] as int?, friend: json['friend'] as int?, attention: json['attention'] as int?, @@ -131,19 +79,11 @@ class SpaceCard { pendant: json['pendant'] == null ? null : Pendant.fromJson(json['pendant'] as Map), - nameplate: json['nameplate'] == null - ? null - : Nameplate.fromJson(json['nameplate'] as Map), officialVerify: json['official_verify'] == null ? null : OfficialVerify.fromJson( json['official_verify'] as Map, ), - professionVerify: json['profession_verify'] == null - ? null - : ProfessionVerify.fromJson( - json['profession_verify'] as Map, - ), vip: json['vip'] == null ? null : Vip.fromJson(json['vip'] as Map), @@ -159,10 +99,6 @@ class SpaceCard { relation: json['relation'] == null ? null : SpaceRelation.fromJson(json['relation'] as Map), - isDeleted: json['is_deleted'] as int?, - honours: json['honours'] == null - ? null - : Honours.fromJson(json['honours'] as Map), liveFansWearing: json['live_fans_wearing'] == null ? null : LiveFansWearing.fromJson( @@ -172,21 +108,6 @@ class SpaceCard { ?.where((e) => const ['location', 'real_name'].contains(e['type'])) .map((e) => SpaceTag.fromJson(e as Map)) .toList(), - faceNftNew: json['face_nft_new'] as int?, - hasFaceNft: json['has_face_nft'] as bool?, - nftCertificate: json['nft_certificate'] == null - ? null - : NftCertificate.fromJson( - json['nft_certificate'] as Map, - ), - entrance: json['entrance'] == null - ? null - : Entrance.fromJson(json['entrance'] as Map), - nftId: json['nft_id'] as String?, - nftFaceIcon: json['nft_face_icon'] as dynamic, - digitalId: json['digital_id'] as String?, - digitalType: json['digital_type'] as int?, - hasDigitalAsset: json['has_digital_asset'] as bool?, prInfo: json['pr_info'] == null ? null : SpacePrInfo.fromJson(json['pr_info'] as Map), diff --git a/lib/models_new/space/space/category.dart b/lib/models_new/space/space/category.dart deleted file mode 100644 index 7b202e701..000000000 --- a/lib/models_new/space/space/category.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Category { - int? id; - int? parentId; - String? name; - - Category({this.id, this.parentId, this.name}); - - factory Category.fromJson(Map json) => Category( - id: json['id'] as int?, - parentId: json['parent_id'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/space/space/collection_top_simple.dart b/lib/models_new/space/space/collection_top_simple.dart index f342af140..365c987fc 100644 --- a/lib/models_new/space/space/collection_top_simple.dart +++ b/lib/models_new/space/space/collection_top_simple.dart @@ -1,17 +1,10 @@ -import 'package:PiliPlus/models_new/space/space/preference.dart'; import 'package:PiliPlus/models_new/space/space/top.dart'; class CollectionTopSimple { Top? top; - int? max; - Preference? preference; - String? collectionCompletedUrl; CollectionTopSimple({ this.top, - this.max, - this.preference, - this.collectionCompletedUrl, }); factory CollectionTopSimple.fromJson(Map json) { @@ -19,11 +12,6 @@ class CollectionTopSimple { top: json['top'] == null ? null : Top.fromJson(json['top'] as Map), - max: json['max'] as int?, - preference: json['preference'] == null - ? null - : Preference.fromJson(json['preference'] as Map), - collectionCompletedUrl: json['collection_completed_url'] as String?, ); } } diff --git a/lib/models_new/space/space/color_config.dart b/lib/models_new/space/space/color_config.dart deleted file mode 100644 index 10e68358f..000000000 --- a/lib/models_new/space/space/color_config.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/day.dart'; -import 'package:PiliPlus/models_new/space/space/night.dart'; - -class ColorConfig { - bool? isDarkModeAware; - Day? day; - Night? night; - - ColorConfig({this.isDarkModeAware, this.day, this.night}); - - factory ColorConfig.fromJson(Map json) => ColorConfig( - isDarkModeAware: json['is_dark_mode_aware'] as bool?, - day: json['day'] == null - ? null - : Day.fromJson(json['day'] as Map), - night: json['night'] == null - ? null - : Night.fromJson(json['night'] as Map), - ); -} diff --git a/lib/models_new/space/space/colour.dart b/lib/models_new/space/space/colour.dart deleted file mode 100644 index 2bb5ef6f7..000000000 --- a/lib/models_new/space/space/colour.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Colour { - String? dark; - String? normal; - - Colour({this.dark, this.normal}); - - factory Colour.fromJson(Map json) => Colour( - dark: json['dark'] as String?, - normal: json['normal'] as String?, - ); -} diff --git a/lib/models_new/space/space/container_size.dart b/lib/models_new/space/space/container_size.dart deleted file mode 100644 index 8d2252460..000000000 --- a/lib/models_new/space/space/container_size.dart +++ /dev/null @@ -1,11 +0,0 @@ -class ContainerSize { - double? width; - double? height; - - ContainerSize({this.width, this.height}); - - factory ContainerSize.fromJson(Map json) => ContainerSize( - width: (json['width'] as num?)?.toDouble(), - height: (json['height'] as num?)?.toDouble(), - ); -} diff --git a/lib/models_new/space/space/cover.dart b/lib/models_new/space/space/cover.dart deleted file mode 100644 index 6463e3786..000000000 --- a/lib/models_new/space/space/cover.dart +++ /dev/null @@ -1,9 +0,0 @@ -class Cover { - String? url; - - Cover({this.url}); - - factory Cover.fromJson(Map json) => Cover( - url: json['url'] as String?, - ); -} diff --git a/lib/models_new/space/space/data.dart b/lib/models_new/space/space/data.dart index b2456c2ef..4155dc4be 100644 --- a/lib/models_new/space/space/data.dart +++ b/lib/models_new/space/space/data.dart @@ -1,34 +1,28 @@ import 'package:PiliPlus/models_new/space/space/archive.dart'; import 'package:PiliPlus/models_new/space/space/article.dart'; -import 'package:PiliPlus/models_new/space/space/attention_tip.dart'; import 'package:PiliPlus/models_new/space/space/audios.dart'; import 'package:PiliPlus/models_new/space/space/card.dart'; import 'package:PiliPlus/models_new/space/space/cheese.dart'; import 'package:PiliPlus/models_new/space/space/coin_archive.dart'; import 'package:PiliPlus/models_new/space/space/comic.dart'; import 'package:PiliPlus/models_new/space/space/elec.dart'; -import 'package:PiliPlus/models_new/space/space/entry.dart'; import 'package:PiliPlus/models_new/space/space/favourite2.dart'; import 'package:PiliPlus/models_new/space/space/guard.dart'; import 'package:PiliPlus/models_new/space/space/images.dart'; import 'package:PiliPlus/models_new/space/space/like_archive.dart'; import 'package:PiliPlus/models_new/space/space/live.dart'; -import 'package:PiliPlus/models_new/space/space/nft_show_module.dart'; -import 'package:PiliPlus/models_new/space/space/play_game.dart'; +import 'package:PiliPlus/models_new/space/space/reservation_card_list.dart'; import 'package:PiliPlus/models_new/space/space/season.dart'; import 'package:PiliPlus/models_new/space/space/series.dart'; import 'package:PiliPlus/models_new/space/space/setting.dart'; -import 'package:PiliPlus/models_new/space/space/space_button_list.dart'; import 'package:PiliPlus/models_new/space/space/tab.dart'; import 'package:PiliPlus/models_new/space/space/tab2.dart'; import 'package:PiliPlus/models_new/space/space/ugc_season.dart'; class SpaceData { int? relation; - int? guestRelation; int? medal; String? defaultTab; - bool? isParams; SpaceSetting? setting; SpaceTab? tab; SpaceCard? card; @@ -37,7 +31,6 @@ class SpaceData { Elec? elec; Archive? archive; SpaceSeries? series; - PlayGame? playGame; Article? article; SpaceSeason? season; CoinArchive? coinArchive; @@ -46,26 +39,17 @@ class SpaceData { Favourite2? favourite2; Comic? comic; UgcSeason? ugcSeason; - int? adShopType; - String? adContainerPath; Cheese? cheese; Guard? guard; - AttentionTip? attentionTip; - NftShowModule? nftShowModule; List? tab2; - dynamic nftFaceButton; - dynamic digitalButton; - List? entry; - List? spaceButtonList; int? relSpecial; bool? hasItem; + List? reservationCardList; SpaceData({ this.relation, - this.guestRelation, this.medal, this.defaultTab, - this.isParams, this.setting, this.tab, this.card, @@ -74,7 +58,6 @@ class SpaceData { this.elec, this.archive, this.series, - this.playGame, this.article, this.season, this.coinArchive, @@ -85,22 +68,15 @@ class SpaceData { this.ugcSeason, this.cheese, this.guard, - this.attentionTip, - this.nftShowModule, this.tab2, - this.nftFaceButton, - this.digitalButton, - this.entry, - this.spaceButtonList, this.relSpecial, + this.reservationCardList, }); SpaceData.fromJson(Map json) { relation = json['relation'] as int?; - guestRelation = json['guest_relation'] as int?; medal = json['medal'] as int?; defaultTab = json['default_tab'] as String?; - isParams = json['is_params'] as bool?; setting = json['setting'] == null ? null : SpaceSetting.fromJson(json['setting'] as Map); @@ -125,9 +101,6 @@ class SpaceData { series = json['series'] == null ? null : SpaceSeries.fromJson(json['series'] as Map); - playGame = json['play_game'] == null - ? null - : PlayGame.fromJson(json['play_game'] as Map); article = json['article'] == null ? null : Article.fromJson(json['article'] as Map); @@ -158,26 +131,13 @@ class SpaceData { guard = json['guard'] == null ? null : Guard.fromJson(json['guard'] as Map); - attentionTip = json['attention_tip'] == null - ? null - : AttentionTip.fromJson(json['attention_tip'] as Map); - nftShowModule = json['nft_show_module'] == null - ? null - : NftShowModule.fromJson( - json['nft_show_module'] as Map, - ); tab2 = (json['tab2'] as List?) ?.map((e) => SpaceTab2.fromJson(e as Map)) .toList(); - nftFaceButton = json['nft_face_button'] as dynamic; - digitalButton = json['digital_button'] as dynamic; - entry = (json['entry'] as List?) - ?.map((e) => Entry.fromJson(e as Map)) - .toList(); - spaceButtonList = (json['space_button_list'] as List?) - ?.map((e) => SpaceButtonList.fromJson(e as Map)) - .toList(); relSpecial = (json['rel_special'] as num?)?.toInt(); + reservationCardList = (json['reservation_card_list'] as List?) + ?.map((e) => ReservationCardItem.fromJson(e)) + .toList(); hasItem = archive?.item?.isNotEmpty == true || favourite2?.item?.isNotEmpty == true || diff --git a/lib/models_new/space/space/day.dart b/lib/models_new/space/space/day.dart deleted file mode 100644 index ac458a786..000000000 --- a/lib/models_new/space/space/day.dart +++ /dev/null @@ -1,9 +0,0 @@ -class Day { - String? argb; - - Day({this.argb}); - - factory Day.fromJson(Map json) => Day( - argb: json['argb'] as String?, - ); -} diff --git a/lib/models_new/space/space/digital_info.dart b/lib/models_new/space/space/digital_info.dart deleted file mode 100644 index eef172c60..000000000 --- a/lib/models_new/space/space/digital_info.dart +++ /dev/null @@ -1,44 +0,0 @@ -class DigitalInfo { - bool? active; - String? jumpUrl; - int? nftType; - int? backgroundHandle; - String? animationFirstFrame; - dynamic musicAlbum; - dynamic animation; - String? nftRegionTitle; - int? cardId; - String? cutSpaceBg; - int? partType; - String? itemJumpUrl; - - DigitalInfo({ - this.active, - this.jumpUrl, - this.nftType, - this.backgroundHandle, - this.animationFirstFrame, - this.musicAlbum, - this.animation, - this.nftRegionTitle, - this.cardId, - this.cutSpaceBg, - this.partType, - this.itemJumpUrl, - }); - - factory DigitalInfo.fromJson(Map json) => DigitalInfo( - active: json['active'] as bool?, - jumpUrl: json['jump_url'] as String?, - nftType: json['nft_type'] as int?, - backgroundHandle: json['background_handle'] as int?, - animationFirstFrame: json['animation_first_frame'] as String?, - musicAlbum: json['music_album'] as dynamic, - animation: json['animation'] as dynamic, - nftRegionTitle: json['nft_region_title'] as String?, - cardId: json['card_id'] as int?, - cutSpaceBg: json['cut_space_bg'] as String?, - partType: json['part_type'] as int?, - itemJumpUrl: json['item_jump_url'] as String?, - ); -} diff --git a/lib/models_new/space/space/display.dart b/lib/models_new/space/space/display.dart deleted file mode 100644 index a7beb2f52..000000000 --- a/lib/models_new/space/space/display.dart +++ /dev/null @@ -1,20 +0,0 @@ -class Display { - String? bgThemeLight; - String? bgThemeNight; - String? nftPoster; - String? nftRaw; - - Display({ - this.bgThemeLight, - this.bgThemeNight, - this.nftPoster, - this.nftRaw, - }); - - factory Display.fromJson(Map json) => Display( - bgThemeLight: json['bg_theme_light'] as String?, - bgThemeNight: json['bg_theme_night'] as String?, - nftPoster: json['nft_poster'] as String?, - nftRaw: json['nft_raw'] as String?, - ); -} diff --git a/lib/models_new/space/space/draw.dart b/lib/models_new/space/space/draw.dart deleted file mode 100644 index 6408c3314..000000000 --- a/lib/models_new/space/space/draw.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/color_config.dart'; - -class Draw { - int? drawType; - int? fillMode; - ColorConfig? colorConfig; - - Draw({this.drawType, this.fillMode, this.colorConfig}); - - factory Draw.fromJson(Map json) => Draw( - drawType: json['draw_type'] as int?, - fillMode: json['fill_mode'] as int?, - colorConfig: json['color_config'] == null - ? null - : ColorConfig.fromJson(json['color_config'] as Map), - ); -} diff --git a/lib/models_new/space/space/draw_src.dart b/lib/models_new/space/space/draw_src.dart deleted file mode 100644 index 58a3e6001..000000000 --- a/lib/models_new/space/space/draw_src.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/draw.dart'; - -class DrawSrc { - int? srcType; - Draw? draw; - - DrawSrc({this.srcType, this.draw}); - - factory DrawSrc.fromJson(Map json) => DrawSrc( - srcType: json['src_type'] as int?, - draw: json['draw'] == null - ? null - : Draw.fromJson(json['draw'] as Map), - ); -} diff --git a/lib/models_new/space/space/elec.dart b/lib/models_new/space/space/elec.dart index 1db500ad5..1bcaa61ab 100644 --- a/lib/models_new/space/space/elec.dart +++ b/lib/models_new/space/space/elec.dart @@ -1,54 +1,31 @@ -import 'package:PiliPlus/models_new/space/space/elec_set.dart'; -import 'package:PiliPlus/models_new/space/space/list.dart'; - class Elec { - bool? show; int? total; - int? count; - int? elecNum; - List? list; - ElecSet? elecSet; - int? state; - String? upowerTitle; - String? upowerJumpUrl; - String? upowerIconUrl; - int? upowerState; - String? rankTitle; - String? rankUrl; + List? list; Elec({ - this.show, this.total, - this.count, - this.elecNum, this.list, - this.elecSet, - this.state, - this.upowerTitle, - this.upowerJumpUrl, - this.upowerIconUrl, - this.upowerState, - this.rankTitle, - this.rankUrl, }); factory Elec.fromJson(Map json) => Elec( - show: json['show'] as bool?, total: json['total'] as int?, - count: json['count'] as int?, - elecNum: json['elec_num'] as int?, list: (json['list'] as List?) - ?.map((e) => ListItem.fromJson(e as Map)) + ?.map((e) => ElecItem.fromJson(e)) .toList(), - elecSet: json['elec_set'] == null - ? null - : ElecSet.fromJson(json['elec_set'] as Map), - state: json['state'] as int?, - upowerTitle: json['upower_title'] as String?, - upowerJumpUrl: json['upower_jump_url'] as String?, - upowerIconUrl: json['upower_icon_url'] as String?, - upowerState: json['upower_state'] as int?, - rankTitle: json['rank_title'] as String?, - rankUrl: json['rank_url'] as String?, + ); +} + +class ElecItem { + String? uname; + String? avatar; + + ElecItem({ + this.uname, + this.avatar, + }); + + factory ElecItem.fromJson(Map json) => ElecItem( + uname: json['uname'] as String?, + avatar: json['avatar'] as String?, ); } diff --git a/lib/models_new/space/space/elec_list.dart b/lib/models_new/space/space/elec_list.dart deleted file mode 100644 index 0696d5d67..000000000 --- a/lib/models_new/space/space/elec_list.dart +++ /dev/null @@ -1,44 +0,0 @@ -class ElecList { - String? title; - int? elecNum; - int? isCustomize; - String? bpNum; - String? minBp; - String? maxBp; - int? bpNumFen; - int? isDefault; - int? minElec; - int? maxElec; - int? minBpFen; - int? maxBpFen; - - ElecList({ - this.title, - this.elecNum, - this.isCustomize, - this.bpNum, - this.minBp, - this.maxBp, - this.bpNumFen, - this.isDefault, - this.minElec, - this.maxElec, - this.minBpFen, - this.maxBpFen, - }); - - factory ElecList.fromJson(Map json) => ElecList( - title: json['title'] as String?, - elecNum: json['elec_num'] as int?, - isCustomize: json['is_customize'] as int?, - bpNum: json['bp_num'] as String?, - minBp: json['min_bp'] as String?, - maxBp: json['max_bp'] as String?, - bpNumFen: json['bp_num_fen'] as int?, - isDefault: json['is_default'] as int?, - minElec: json['min_elec'] as int?, - maxElec: json['max_elec'] as int?, - minBpFen: json['min_bp_fen'] as int?, - maxBpFen: json['max_bp_fen'] as int?, - ); -} diff --git a/lib/models_new/space/space/elec_set.dart b/lib/models_new/space/space/elec_set.dart deleted file mode 100644 index a48c581d9..000000000 --- a/lib/models_new/space/space/elec_set.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/elec_list.dart'; - -class ElecSet { - int? elecTheme; - int? rmbRate; - int? integrityRate; - int? roundMode; - List? elecList; - String? batteryItemDesc; - - ElecSet({ - this.elecTheme, - this.rmbRate, - this.integrityRate, - this.roundMode, - this.elecList, - this.batteryItemDesc, - }); - - factory ElecSet.fromJson(Map json) => ElecSet( - elecTheme: json['elec_theme'] as int?, - rmbRate: json['rmb_rate'] as int?, - integrityRate: json['integrity_rate'] as int?, - roundMode: json['round_mode'] as int?, - elecList: (json['elec_list'] as List?) - ?.map((e) => ElecList.fromJson(e as Map)) - .toList(), - batteryItemDesc: json['battery_item_desc'] as String?, - ); -} diff --git a/lib/models_new/space/space/entrance.dart b/lib/models_new/space/space/entrance.dart deleted file mode 100644 index e2c6dd941..000000000 --- a/lib/models_new/space/space/entrance.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Entrance { - String? icon; - String? jumpUrl; - bool? isShowEntrance; - - Entrance({this.icon, this.jumpUrl, this.isShowEntrance}); - - factory Entrance.fromJson(Map json) => Entrance( - icon: json['icon'] as String?, - jumpUrl: json['jump_url'] as String?, - isShowEntrance: json['is_show_entrance'] as bool?, - ); -} diff --git a/lib/models_new/space/space/entrance_button.dart b/lib/models_new/space/space/entrance_button.dart deleted file mode 100644 index e70dbca05..000000000 --- a/lib/models_new/space/space/entrance_button.dart +++ /dev/null @@ -1,13 +0,0 @@ -class EntranceButton { - String? uri; - String? title; - - EntranceButton({this.uri, this.title}); - - factory EntranceButton.fromJson(Map json) { - return EntranceButton( - uri: json['uri'] as String?, - title: json['title'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/entry.dart b/lib/models_new/space/space/entry.dart deleted file mode 100644 index 183e48434..000000000 --- a/lib/models_new/space/space/entry.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Entry { - String? icon; - String? jumpLink; - String? accessibility; - bool? needLogin; - - Entry({this.icon, this.jumpLink, this.accessibility, this.needLogin}); - - factory Entry.fromJson(Map json) => Entry( - icon: json['icon'] as String?, - jumpLink: json['jump_link'] as String?, - accessibility: json['accessibility'] as String?, - needLogin: json['need_login'] as bool?, - ); -} diff --git a/lib/models_new/space/space/episodic_button.dart b/lib/models_new/space/space/episodic_button.dart deleted file mode 100644 index c53c5184f..000000000 --- a/lib/models_new/space/space/episodic_button.dart +++ /dev/null @@ -1,13 +0,0 @@ -class EpisodicButton { - String? text; - String? uri; - - EpisodicButton({this.text, this.uri}); - - factory EpisodicButton.fromJson(Map json) { - return EpisodicButton( - text: json['text'] as String?, - uri: json['uri'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/extra.dart b/lib/models_new/space/space/extra.dart deleted file mode 100644 index 4fa04ed16..000000000 --- a/lib/models_new/space/space/extra.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/card.dart'; - -class Extra { - SpaceCard? card; - int? salesType; - int? upzoneEntranceType; - String? upzoneEntranceReportId; - - Extra({ - this.card, - this.salesType, - this.upzoneEntranceType, - this.upzoneEntranceReportId, - }); - - factory Extra.fromJson(Map json) => Extra( - card: json['card'] == null - ? null - : SpaceCard.fromJson(json['card'] as Map), - salesType: json['sales_type'] as int?, - upzoneEntranceType: json['upzone_entrance_type'] as int?, - upzoneEntranceReportId: json['upzone_entrance_report_id'] as String?, - ); -} diff --git a/lib/models_new/space/space/general_spec.dart b/lib/models_new/space/space/general_spec.dart deleted file mode 100644 index c69b0515b..000000000 --- a/lib/models_new/space/space/general_spec.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/pos_spec.dart'; -import 'package:PiliPlus/models_new/space/space/render_spec.dart'; -import 'package:PiliPlus/models_new/space/space/size_spec.dart'; - -class GeneralSpec { - PosSpec? posSpec; - SizeSpec? sizeSpec; - RenderSpec? renderSpec; - - GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec}); - - factory GeneralSpec.fromJson(Map json) => GeneralSpec( - posSpec: json['pos_spec'] == null - ? null - : PosSpec.fromJson(json['pos_spec'] as Map), - sizeSpec: json['size_spec'] == null - ? null - : SizeSpec.fromJson(json['size_spec'] as Map), - renderSpec: json['render_spec'] == null - ? null - : RenderSpec.fromJson(json['render_spec'] as Map), - ); -} diff --git a/lib/models_new/space/space/guard.dart b/lib/models_new/space/space/guard.dart index 0c2bace36..2fe4cd197 100644 --- a/lib/models_new/space/space/guard.dart +++ b/lib/models_new/space/space/guard.dart @@ -1,21 +1,21 @@ -import 'package:PiliPlus/models_new/space/space/item.dart'; +import 'package:PiliPlus/models/model_owner.dart'; class Guard { String? uri; String? desc; - String? highLight; - List? item; - String? buttonMsg; + List? item; - Guard({this.uri, this.desc, this.highLight, this.item, this.buttonMsg}); + Guard({ + this.uri, + this.desc, + this.item, + }); factory Guard.fromJson(Map json) => Guard( uri: json['uri'] as String?, desc: json['desc'] as String?, - highLight: json['high_light'] as String?, item: (json['item'] as List?) - ?.map((e) => Item.fromJson(e as Map)) + ?.map((e) => Owner.fromJson(e as Map)) .toList(), - buttonMsg: json['button_msg'] as String?, ); } diff --git a/lib/models_new/space/space/honours.dart b/lib/models_new/space/space/honours.dart deleted file mode 100644 index da7d9d573..000000000 --- a/lib/models_new/space/space/honours.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/colour.dart'; - -class Honours { - Colour? colour; - List? tags; - - Honours({this.colour, this.tags}); - - factory Honours.fromJson(Map json) => Honours( - colour: json['colour'] == null - ? null - : Colour.fromJson(json['colour'] as Map), - tags: json['tags'] as List?, - ); -} diff --git a/lib/models_new/space/space/images.dart b/lib/models_new/space/space/images.dart index 5ada250f1..7c35c27c3 100644 --- a/lib/models_new/space/space/images.dart +++ b/lib/models_new/space/space/images.dart @@ -1,47 +1,19 @@ import 'package:PiliPlus/models_new/space/space/collection_top_simple.dart'; -import 'package:PiliPlus/models_new/space/space/digital_info.dart'; -import 'package:PiliPlus/models_new/space/space/entrance_button.dart'; -import 'package:PiliPlus/models_new/space/space/purchase_button.dart'; class SpaceImages { String? imgUrl; String? nightImgurl; - bool? goodsAvailable; - PurchaseButton? purchaseButton; - EntranceButton? entranceButton; - DigitalInfo? digitalInfo; - bool? showDigital; CollectionTopSimple? collectionTopSimple; SpaceImages({ this.imgUrl, this.nightImgurl, - this.goodsAvailable, - this.purchaseButton, - this.entranceButton, - this.digitalInfo, - this.showDigital, this.collectionTopSimple, }); factory SpaceImages.fromJson(Map json) => SpaceImages( imgUrl: json['imgUrl'] as String?, nightImgurl: json['night_imgurl'] as String?, - goodsAvailable: json['goods_available'] as bool?, - purchaseButton: json['purchase_button'] == null - ? null - : PurchaseButton.fromJson( - json['purchase_button'] as Map, - ), - entranceButton: json['entrance_button'] == null - ? null - : EntranceButton.fromJson( - json['entrance_button'] as Map, - ), - digitalInfo: json['digital_info'] == null - ? null - : DigitalInfo.fromJson(json['digital_info'] as Map), - showDigital: json['show_digital'] as bool?, collectionTopSimple: json['collection_top_simple'] == null ? null : CollectionTopSimple.fromJson( diff --git a/lib/models_new/space/space/item.dart b/lib/models_new/space/space/item.dart index ccbd3aa9e..0506d90bc 100644 --- a/lib/models_new/space/space/item.dart +++ b/lib/models_new/space/space/item.dart @@ -1,5 +1,3 @@ -import 'package:PiliPlus/models_new/space/space/badge.dart'; - class Item { String? title; String? subtitle; @@ -24,7 +22,6 @@ class Item { int? danmaku; int? ctime; int? ugcPay; - List? badges; String? author; bool? state; String? bvid; @@ -58,7 +55,6 @@ class Item { this.danmaku, this.ctime, this.ugcPay, - this.badges, this.author, this.state, this.bvid, @@ -93,9 +89,6 @@ class Item { danmaku: json['danmaku'] as int?, ctime: json['ctime'] as int?, ugcPay: json['ugc_pay'] as int?, - badges: (json['badges'] as List?) - ?.map((e) => Badge.fromJson(e as Map)) - .toList(), author: json['author'] as String?, state: json['state'] as bool?, bvid: json['bvid'] as String?, diff --git a/lib/models_new/space/space/label.dart b/lib/models_new/space/space/label.dart deleted file mode 100644 index 3368bab8d..000000000 --- a/lib/models_new/space/space/label.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Label { - String? path; - String? text; - String? labelTheme; - String? textColor; - int? bgStyle; - String? bgColor; - String? borderColor; - String? image; - - Label({ - this.path, - this.text, - this.labelTheme, - this.textColor, - this.bgStyle, - this.bgColor, - this.borderColor, - this.image, - }); - - factory Label.fromJson(Map json) => Label( - path: json['path'] as String?, - text: json['text'] as String?, - labelTheme: json['label_theme'] as String?, - textColor: json['text_color'] as String?, - bgStyle: json['bg_style'] as int?, - bgColor: json['bg_color'] as String?, - borderColor: json['border_color'] as String?, - image: json['image'] as String?, - ); -} diff --git a/lib/models_new/space/space/level_info.dart b/lib/models_new/space/space/level_info.dart index 38f32ed7c..0fa7c6998 100644 --- a/lib/models_new/space/space/level_info.dart +++ b/lib/models_new/space/space/level_info.dart @@ -1,32 +1,14 @@ -import 'package:PiliPlus/models_new/space/space/senior_inquiry.dart'; - class LevelInfo { int? currentLevel; - int? currentMin; - int? currentExp; - dynamic nextExp; int? identity; - SeniorInquiry? seniorInquiry; LevelInfo({ this.currentLevel, - this.currentMin, - this.currentExp, - this.nextExp, this.identity, - this.seniorInquiry, }); factory LevelInfo.fromJson(Map json) => LevelInfo( currentLevel: json['current_level'] as int?, - currentMin: json['current_min'] as int?, - currentExp: json['current_exp'] as int?, - nextExp: json['next_exp'] as dynamic, identity: json['identity'] as int?, - seniorInquiry: json['senior_inquiry'] == null - ? null - : SeniorInquiry.fromJson( - json['senior_inquiry'] as Map, - ), ); } diff --git a/lib/models_new/space/space/list.dart b/lib/models_new/space/space/list.dart index 33bad5ddb..2798ec5ff 100644 --- a/lib/models_new/space/space/list.dart +++ b/lib/models_new/space/space/list.dart @@ -4,7 +4,6 @@ class ListItem { int? trendType; String? message; int? mid; - dynamic vipInfo; String? uname; String? avatar; @@ -14,7 +13,6 @@ class ListItem { this.trendType, this.message, this.mid, - this.vipInfo, this.uname, this.avatar, }); @@ -25,7 +23,6 @@ class ListItem { trendType: json['trend_type'] as int?, message: json['message'] as String?, mid: json['mid'] as int?, - vipInfo: json['vip_info'] as dynamic, uname: json['uname'] as String?, avatar: json['avatar'] as String?, ); diff --git a/lib/models_new/space/space/media.dart b/lib/models_new/space/space/media.dart deleted file mode 100644 index 64a3ffabc..000000000 --- a/lib/models_new/space/space/media.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Media { - int? score; - int? mediaId; - String? title; - String? cover; - String? area; - int? typeId; - String? typeName; - int? spoiler; - - Media({ - this.score, - this.mediaId, - this.title, - this.cover, - this.area, - this.typeId, - this.typeName, - this.spoiler, - }); - - factory Media.fromJson(Map 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?, - ); -} diff --git a/lib/models_new/space/space/nameplate.dart b/lib/models_new/space/space/nameplate.dart deleted file mode 100644 index ccf0b89fc..000000000 --- a/lib/models_new/space/space/nameplate.dart +++ /dev/null @@ -1,26 +0,0 @@ -class Nameplate { - int? nid; - String? name; - String? image; - String? imageSmall; - String? level; - String? condition; - - Nameplate({ - this.nid, - this.name, - this.image, - this.imageSmall, - this.level, - this.condition, - }); - - factory Nameplate.fromJson(Map json) => Nameplate( - nid: json['nid'] as int?, - name: json['name'] as String?, - image: json['image'] as String?, - imageSmall: json['image_small'] as String?, - level: json['level'] as String?, - condition: json['condition'] as String?, - ); -} diff --git a/lib/models_new/space/space/nft.dart b/lib/models_new/space/space/nft.dart deleted file mode 100644 index 112337d58..000000000 --- a/lib/models_new/space/space/nft.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/display.dart'; - -class Nft { - String? itemName; - String? issuer; - String? serialNumber; - String? detailUrl; - int? nftStatus; - Display? display; - - Nft({ - this.itemName, - this.issuer, - this.serialNumber, - this.detailUrl, - this.nftStatus, - this.display, - }); - - factory Nft.fromJson(Map json) => Nft( - itemName: json['item_name'] as String?, - issuer: json['issuer'] as String?, - serialNumber: json['serial_number'] as String?, - detailUrl: json['detail_url'] as String?, - nftStatus: json['nft_status'] as int?, - display: json['display'] == null - ? null - : Display.fromJson(json['display'] as Map), - ); -} diff --git a/lib/models_new/space/space/nft_certificate.dart b/lib/models_new/space/space/nft_certificate.dart deleted file mode 100644 index 328abbd4c..000000000 --- a/lib/models_new/space/space/nft_certificate.dart +++ /dev/null @@ -1,11 +0,0 @@ -class NftCertificate { - String? detailUrl; - - NftCertificate({this.detailUrl}); - - factory NftCertificate.fromJson(Map json) { - return NftCertificate( - detailUrl: json['detail_url'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/nft_show_module.dart b/lib/models_new/space/space/nft_show_module.dart deleted file mode 100644 index 8cb0cc34a..000000000 --- a/lib/models_new/space/space/nft_show_module.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/nft.dart'; - -class NftShowModule { - int? total; - String? artsMoreJump; - List? nfts; - String? floorTitle; - - NftShowModule({ - this.total, - this.artsMoreJump, - this.nfts, - this.floorTitle, - }); - - factory NftShowModule.fromJson(Map json) => NftShowModule( - total: json['total'] as int?, - artsMoreJump: json['arts_more_jump'] as String?, - nfts: (json['nfts'] as List?) - ?.map((e) => Nft.fromJson(e as Map)) - .toList(), - floorTitle: json['floor_title'] as String?, - ); -} diff --git a/lib/models_new/space/space/night.dart b/lib/models_new/space/space/night.dart deleted file mode 100644 index c9fb6c9a7..000000000 --- a/lib/models_new/space/space/night.dart +++ /dev/null @@ -1,9 +0,0 @@ -class Night { - String? argb; - - Night({this.argb}); - - factory Night.fromJson(Map json) => Night( - argb: json['argb'] as String?, - ); -} diff --git a/lib/models_new/space/space/official_verify.dart b/lib/models_new/space/space/official_verify.dart index b6230da68..eb6ae21c3 100644 --- a/lib/models_new/space/space/official_verify.dart +++ b/lib/models_new/space/space/official_verify.dart @@ -1,28 +1,9 @@ -class OfficialVerify { - int? type; - String? desc; - int? role; - String? title; - String? icon; +import 'package:PiliPlus/models/model_avatar.dart'; + +class OfficialVerify extends BaseOfficialVerify { String? spliceTitle; - OfficialVerify({ - this.type, - this.desc, - this.role, - this.title, - this.icon, - this.spliceTitle, - }); - - factory OfficialVerify.fromJson(Map json) { - return OfficialVerify( - type: json['type'] as int?, - desc: json['desc'] as String?, - role: json['role'] as int?, - title: json['title'] as String?, - icon: json['icon'] as String?, - spliceTitle: json['splice_title'] as String?, - ); + OfficialVerify.fromJson(Map json) : super.fromJson(json) { + spliceTitle = json['splice_title'] as String?; } } diff --git a/lib/models_new/space/space/play_game.dart b/lib/models_new/space/space/play_game.dart deleted file mode 100644 index b0d7b0eb8..000000000 --- a/lib/models_new/space/space/play_game.dart +++ /dev/null @@ -1,11 +0,0 @@ -class PlayGame { - int? count; - List? item; - - PlayGame({this.count, this.item}); - - factory PlayGame.fromJson(Map json) => PlayGame( - count: json['count'] as int?, - item: json['item'] as List?, - ); -} diff --git a/lib/models_new/space/space/pos_spec.dart b/lib/models_new/space/space/pos_spec.dart deleted file mode 100644 index 140da9c10..000000000 --- a/lib/models_new/space/space/pos_spec.dart +++ /dev/null @@ -1,13 +0,0 @@ -class PosSpec { - int? coordinatePos; - double? axisX; - double? axisY; - - PosSpec({this.coordinatePos, this.axisX, this.axisY}); - - factory PosSpec.fromJson(Map json) => PosSpec( - coordinatePos: json['coordinate_pos'] as int?, - axisX: (json['axis_x'] as num?)?.toDouble(), - axisY: (json['axis_y'] as num?)?.toDouble(), - ); -} diff --git a/lib/models_new/space/space/preference.dart b/lib/models_new/space/space/preference.dart deleted file mode 100644 index c7373363c..000000000 --- a/lib/models_new/space/space/preference.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Preference { - bool? collectionPublic; - String? garbFirstGain; - int? orderType; - - Preference({this.collectionPublic, this.garbFirstGain, this.orderType}); - - factory Preference.fromJson(Map json) => Preference( - collectionPublic: json['collection_public'] as bool?, - garbFirstGain: json['garb_first_gain'] as String?, - orderType: json['order_type'] as int?, - ); -} diff --git a/lib/models_new/space/space/profession_verify.dart b/lib/models_new/space/space/profession_verify.dart deleted file mode 100644 index 64fc96c46..000000000 --- a/lib/models_new/space/space/profession_verify.dart +++ /dev/null @@ -1,13 +0,0 @@ -class ProfessionVerify { - String? icon; - String? showDesc; - - ProfessionVerify({this.icon, this.showDesc}); - - factory ProfessionVerify.fromJson(Map json) { - return ProfessionVerify( - icon: json['icon'] as String?, - showDesc: json['show_desc'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/purchase_button.dart b/lib/models_new/space/space/purchase_button.dart deleted file mode 100644 index 5f67e31b6..000000000 --- a/lib/models_new/space/space/purchase_button.dart +++ /dev/null @@ -1,13 +0,0 @@ -class PurchaseButton { - String? uri; - String? title; - - PurchaseButton({this.uri, this.title}); - - factory PurchaseButton.fromJson(Map json) { - return PurchaseButton( - uri: json['uri'] as String?, - title: json['title'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/render_spec.dart b/lib/models_new/space/space/render_spec.dart deleted file mode 100644 index 022738977..000000000 --- a/lib/models_new/space/space/render_spec.dart +++ /dev/null @@ -1,9 +0,0 @@ -class RenderSpec { - int? opacity; - - RenderSpec({this.opacity}); - - factory RenderSpec.fromJson(Map json) => RenderSpec( - opacity: json['opacity'] as int?, - ); -} diff --git a/lib/models_new/space/space/res_native_draw.dart b/lib/models_new/space/space/res_native_draw.dart deleted file mode 100644 index 4e057efe2..000000000 --- a/lib/models_new/space/space/res_native_draw.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/draw_src.dart'; - -class ResNativeDraw { - DrawSrc? drawSrc; - - ResNativeDraw({this.drawSrc}); - - factory ResNativeDraw.fromJson(Map json) => ResNativeDraw( - drawSrc: json['draw_src'] == null - ? null - : DrawSrc.fromJson(json['draw_src'] as Map), - ); -} diff --git a/lib/models_new/space/space/reservation_card_list.dart b/lib/models_new/space/space/reservation_card_list.dart new file mode 100644 index 000000000..30dec9b6a --- /dev/null +++ b/lib/models_new/space/space/reservation_card_list.dart @@ -0,0 +1,51 @@ +class ReservationCardItem { + int? sid; + String? name; + int total; + bool isFollow; + int? livePlanStartTime; + String? descText1; + String? dynamicId; + LotteryPrizeInfo? lotteryPrizeInfo; + + ReservationCardItem({ + this.sid, + this.name, + required this.total, + required this.isFollow, + this.livePlanStartTime, + this.descText1, + this.dynamicId, + this.lotteryPrizeInfo, + }); + + factory ReservationCardItem.fromJson(Map json) => + ReservationCardItem( + sid: json['sid'] as int?, + name: json['name'] as String?, + total: json['total'] ?? 0, + isFollow: json['is_follow'] == 1, + livePlanStartTime: json['live_plan_start_time'] as int?, + descText1: json['desc_text_1']?['text'], + dynamicId: json['dynamic_id'] as String?, + lotteryPrizeInfo: json['lottery_prize_info'] == null + ? null + : LotteryPrizeInfo.fromJson( + json['lottery_prize_info'] as Map, + ), + ); +} + +class LotteryPrizeInfo { + String? text; + String? jumpUrl; + + LotteryPrizeInfo({this.text, this.jumpUrl}); + + factory LotteryPrizeInfo.fromJson(Map json) { + return LotteryPrizeInfo( + text: json['text'] as String?, + jumpUrl: json['jump_url'] as String?, + ); + } +} diff --git a/lib/models_new/space/space/resource.dart b/lib/models_new/space/space/resource.dart deleted file mode 100644 index fef0f52ff..000000000 --- a/lib/models_new/space/space/resource.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:PiliPlus/models_new/space/space/res_native_draw.dart'; - -class Resource { - int? resType; - ResNativeDraw? resNativeDraw; - - Resource({this.resType, this.resNativeDraw}); - - factory Resource.fromJson(Map json) => Resource( - resType: json['res_type'] as int?, - resNativeDraw: json['res_native_draw'] == null - ? null - : ResNativeDraw.fromJson( - json['res_native_draw'] as Map, - ), - ); -} diff --git a/lib/models_new/space/space/senior_inquiry.dart b/lib/models_new/space/space/senior_inquiry.dart deleted file mode 100644 index 94a9518b9..000000000 --- a/lib/models_new/space/space/senior_inquiry.dart +++ /dev/null @@ -1,11 +0,0 @@ -class SeniorInquiry { - String? inquiryText; - String? inquiryUrl; - - SeniorInquiry({this.inquiryText, this.inquiryUrl}); - - factory SeniorInquiry.fromJson(Map json) => SeniorInquiry( - inquiryText: json['inquiry_text'] as String?, - inquiryUrl: json['inquiry_url'] as String?, - ); -} diff --git a/lib/models_new/space/space/size_spec.dart b/lib/models_new/space/space/size_spec.dart deleted file mode 100644 index 07ec50441..000000000 --- a/lib/models_new/space/space/size_spec.dart +++ /dev/null @@ -1,11 +0,0 @@ -class SizeSpec { - double? width; - double? height; - - SizeSpec({this.width, this.height}); - - factory SizeSpec.fromJson(Map json) => SizeSpec( - width: (json['width'] as num?)?.toDouble(), - height: (json['height'] as num?)?.toDouble(), - ); -} diff --git a/lib/models_new/space/space/space_button_list.dart b/lib/models_new/space/space/space_button_list.dart deleted file mode 100644 index f095efd4a..000000000 --- a/lib/models_new/space/space/space_button_list.dart +++ /dev/null @@ -1,43 +0,0 @@ -class SpaceButtonList { - String? icon; - String? title; - String? subTitle; - String? url; - String? moduleType; - String? titleDarkColor; - String? titleLightColor; - String? subTitleDarkColor; - String? subTitleLightColor; - String? backgroundDarkColor; - String? backgroundLightColor; - - SpaceButtonList({ - this.icon, - this.title, - this.subTitle, - this.url, - this.moduleType, - this.titleDarkColor, - this.titleLightColor, - this.subTitleDarkColor, - this.subTitleLightColor, - this.backgroundDarkColor, - this.backgroundLightColor, - }); - - factory SpaceButtonList.fromJson(Map json) { - return SpaceButtonList( - icon: json['icon'] as String?, - title: json['title'] as String?, - subTitle: json['sub_title'] as String?, - url: json['url'] as String?, - moduleType: json['module_type'] as String?, - titleDarkColor: json['title_dark_color'] as String?, - titleLightColor: json['title_light_color'] as String?, - subTitleDarkColor: json['sub_title_dark_color'] as String?, - subTitleLightColor: json['sub_title_light_color'] as String?, - backgroundDarkColor: json['background_dark_color'] as String?, - backgroundLightColor: json['background_light_color'] as String?, - ); - } -} diff --git a/lib/models_new/space/space/stats.dart b/lib/models_new/space/space/stats.dart deleted file mode 100644 index 590b8c79a..000000000 --- a/lib/models_new/space/space/stats.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Stats { - int? view; - int? favorite; - int? like; - int? dislike; - int? reply; - int? share; - num? coin; - int? dynam1c; - - Stats({ - this.view, - this.favorite, - this.like, - this.dislike, - this.reply, - this.share, - this.coin, - this.dynam1c, - }); - - factory Stats.fromJson(Map 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 num?, - dynam1c: json['dynamic'] as int?, - ); -} diff --git a/lib/models_new/space/space_archive/badge.dart b/lib/models_new/space/space_archive/badge.dart index 8e814f817..1a73dc155 100644 --- a/lib/models_new/space/space_archive/badge.dart +++ b/lib/models_new/space/space_archive/badge.dart @@ -1,32 +1,11 @@ class Badge { String? text; - String? textColor; - String? textColorNight; - String? bgColor; - String? bgColorNight; - String? borderColor; - String? borderColorNight; - int? bgStyle; Badge({ this.text, - this.textColor, - this.textColorNight, - this.bgColor, - this.bgColorNight, - this.borderColor, - this.borderColorNight, - this.bgStyle, }); factory Badge.fromJson(Map json) => Badge( text: json['text'] as String?, - textColor: json['text_color'] as String?, - textColorNight: json['text_color_night'] as String?, - bgColor: json['bg_color'] as String?, - bgColorNight: json['bg_color_night'] as String?, - borderColor: json['border_color'] as String?, - borderColorNight: json['border_color_night'] as String?, - bgStyle: json['bg_style'] as int?, ); } diff --git a/lib/models_new/space/space_archive/cursor_attr.dart b/lib/models_new/space/space_archive/cursor_attr.dart deleted file mode 100644 index 37abe1d5e..000000000 --- a/lib/models_new/space/space_archive/cursor_attr.dart +++ /dev/null @@ -1,11 +0,0 @@ -class CursorAttr { - bool? isLastWatchedArc; - int? rank; - - CursorAttr({this.isLastWatchedArc, this.rank}); - - factory CursorAttr.fromJson(Map json) => CursorAttr( - isLastWatchedArc: json['is_last_watched_arc'] as bool?, - rank: json['rank'] as int?, - ); -} diff --git a/lib/models_new/space/space_archive/data.dart b/lib/models_new/space/space_archive/data.dart index bdd2b2293..2310d7167 100644 --- a/lib/models_new/space/space_archive/data.dart +++ b/lib/models_new/space/space_archive/data.dart @@ -1,24 +1,18 @@ import 'package:PiliPlus/models_new/space/space_archive/episodic_button.dart'; import 'package:PiliPlus/models_new/space/space_archive/item.dart'; -import 'package:PiliPlus/models_new/space/space_archive/last_watched_locator.dart'; -import 'package:PiliPlus/models_new/space/space_archive/order.dart'; class SpaceArchiveData { EpisodicButton? episodicButton; - List? order; int? count; List? item; - LastWatchedLocator? lastWatchedLocator; bool? hasNext; bool? hasPrev; int? next; SpaceArchiveData({ this.episodicButton, - this.order, this.count, this.item, - this.lastWatchedLocator, this.hasNext, this.hasPrev, this.next, @@ -31,18 +25,10 @@ class SpaceArchiveData { : EpisodicButton.fromJson( json['episodic_button'] as Map, ), - order: (json['order'] as List?) - ?.map((e) => Order.fromJson(e as Map)) - .toList(), count: json['count'] as int?, item: (json['item'] as List?) ?.map((e) => SpaceArchiveItem.fromJson(e as Map)) .toList(), - lastWatchedLocator: json['last_watched_locator'] == null - ? null - : LastWatchedLocator.fromJson( - json['last_watched_locator'] as Map, - ), hasNext: json['has_next'] as bool?, hasPrev: json['has_prev'] as bool?, next: json['next'], diff --git a/lib/models_new/space/space_archive/item.dart b/lib/models_new/space/space_archive/item.dart index 8940f2069..5d03c7db2 100644 --- a/lib/models_new/space/space_archive/item.dart +++ b/lib/models_new/space/space_archive/item.dart @@ -1,33 +1,18 @@ import 'package:PiliPlus/models/model_owner.dart'; import 'package:PiliPlus/models/model_video.dart'; import 'package:PiliPlus/models_new/space/space_archive/badge.dart'; -import 'package:PiliPlus/models_new/space/space_archive/cursor_attr.dart'; import 'package:PiliPlus/models_new/space/space_archive/history.dart'; import 'package:PiliPlus/models_new/space/space_archive/season.dart'; class SpaceArchiveItem extends BaseSimpleVideoItemModel { - String? subtitle; - String? tname; - String? coverIcon; String? uri; String? param; String? goto; String? length; - bool? isPopular; bool? isSteins; - bool? isUgcpay; bool? isCooperation; bool? isPgc; - bool? isLivePlayback; bool? isPugv; - bool? isFold; - bool? isOneself; - int? ctime; - int? ugcPay; - bool? state; - int? videos; - CursorAttr? cursorAttr; - int? iconType; String? publishTimeText; List? badges; SpaceArchiveSeason? season; @@ -37,34 +22,18 @@ class SpaceArchiveItem extends BaseSimpleVideoItemModel { SpaceArchiveItem.fromJson(Map json) { title = json['title']; - subtitle = json['subtitle']; - tname = json['tname']; cover = json['cover']; - coverIcon = json['cover_icon']; uri = json['uri']; param = json['param']; goto = json['goto']; length = json['length']; duration = json['duration'] ?? -1; - isPopular = json['is_popular']; isSteins = json['is_steins']; - isUgcpay = json['is_ugcpay']; isCooperation = json['is_cooperation']; isPgc = json['is_pgc']; - isLivePlayback = json['is_live_playback']; isPugv = json['is_pugv']; - isFold = json['is_fold']; - isOneself = json['is_oneself']; - ctime = json['ctime']; - ugcPay = json['ugc_pay']; - state = json['state']; bvid = json['bvid']; - videos = json['videos']; cid = json['first_cid']; - cursorAttr = json['cursor_attr'] == null - ? null - : CursorAttr.fromJson(json['cursor_attr'] as Map); - iconType = json['icon_type']; publishTimeText = json['publish_time_text']; badges = (json['badges'] as List?) ?.map((e) => Badge.fromJson(e as Map)) diff --git a/lib/models_new/space/space_archive/last_watched_locator.dart b/lib/models_new/space/space_archive/last_watched_locator.dart deleted file mode 100644 index 7c020eeac..000000000 --- a/lib/models_new/space/space_archive/last_watched_locator.dart +++ /dev/null @@ -1,19 +0,0 @@ -class LastWatchedLocator { - int? displayThreshold; - int? insertRanking; - String? text; - - LastWatchedLocator({ - this.displayThreshold, - this.insertRanking, - this.text, - }); - - factory LastWatchedLocator.fromJson(Map json) { - return LastWatchedLocator( - displayThreshold: json['display_threshold'] as int?, - insertRanking: json['insert_ranking'] as int?, - text: json['text'] as String?, - ); - } -} diff --git a/lib/models_new/space/space_archive/order.dart b/lib/models_new/space/space_archive/order.dart deleted file mode 100644 index f0bb1b5eb..000000000 --- a/lib/models_new/space/space_archive/order.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Order { - String? title; - String? value; - - Order({this.title, this.value}); - - factory Order.fromJson(Map json) => Order( - title: json['title'] as String?, - value: json['value'] as String?, - ); -} diff --git a/lib/models_new/space/space_archive/stats.dart b/lib/models_new/space/space_archive/stats.dart deleted file mode 100644 index 9e8997cf4..000000000 --- a/lib/models_new/space/space_archive/stats.dart +++ /dev/null @@ -1,15 +0,0 @@ -class SpaceArchiveStat { - String? viewStr; - String? danmuStr; - - SpaceArchiveStat({ - this.viewStr, - this.danmuStr, - }); - - factory SpaceArchiveStat.fromJson(Map json) => - SpaceArchiveStat( - viewStr: json['view_str'], - danmuStr: json['danmu_str'], - ); -} diff --git a/lib/models_new/space/space_article/author.dart b/lib/models_new/space/space_article/author.dart deleted file mode 100644 index 1a23e45dd..000000000 --- a/lib/models_new/space/space_article/author.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:PiliPlus/models/model_avatar.dart'; - -class Author { - int? mid; - String? name; - String? face; - Pendant? pendant; - BaseOfficialVerify? officialVerify; - Vip? vip; - - Author({ - this.mid, - this.name, - this.face, - this.pendant, - this.officialVerify, - this.vip, - }); - - factory Author.fromJson(Map json) => Author( - mid: json['mid'] as int?, - name: json['name'] as String?, - face: json['face'] as String?, - pendant: json['pendant'] == null - ? null - : Pendant.fromJson(json['pendant'] as Map), - officialVerify: json['official_verify'] == null - ? null - : BaseOfficialVerify.fromJson( - json['official_verify'] as Map, - ), - vip: json['vip'] == null - ? null - : Vip.fromJson(json['vip'] as Map), - ); -} diff --git a/lib/models_new/space/space_article/category.dart b/lib/models_new/space/space_article/category.dart deleted file mode 100644 index 7b202e701..000000000 --- a/lib/models_new/space/space_article/category.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Category { - int? id; - int? parentId; - String? name; - - Category({this.id, this.parentId, this.name}); - - factory Category.fromJson(Map json) => Category( - id: json['id'] as int?, - parentId: json['parent_id'] as int?, - name: json['name'] as String?, - ); -} diff --git a/lib/models_new/space/space_article/data.dart b/lib/models_new/space/space_article/data.dart index 2cf360426..7972879b1 100644 --- a/lib/models_new/space/space_article/data.dart +++ b/lib/models_new/space/space_article/data.dart @@ -1,13 +1,11 @@ import 'package:PiliPlus/models_new/space/space_article/item.dart'; -import 'package:PiliPlus/models_new/space/space_article/list.dart'; class SpaceArticleData { int? count; List? item; int? listsCount; - List? lists; - SpaceArticleData({this.count, this.item, this.listsCount, this.lists}); + SpaceArticleData({this.count, this.item, this.listsCount}); factory SpaceArticleData.fromJson(Map json) => SpaceArticleData( @@ -16,8 +14,5 @@ class SpaceArticleData { ?.map((e) => SpaceArticleItem.fromJson(e as Map)) .toList(), listsCount: json['lists_count'] as int?, - lists: (json['lists'] as List?) - ?.map((e) => SpaceArticleList.fromJson(e as Map)) - .toList(), ); } diff --git a/lib/models_new/space/space_article/item.dart b/lib/models_new/space/space_article/item.dart index 94237d2dd..828b5f807 100644 --- a/lib/models_new/space/space_article/item.dart +++ b/lib/models_new/space/space_article/item.dart @@ -1,136 +1,29 @@ -import 'package:PiliPlus/models_new/space/space_article/author.dart'; -import 'package:PiliPlus/models_new/space/space_article/category.dart'; -import 'package:PiliPlus/models_new/space/space_article/media.dart'; import 'package:PiliPlus/models_new/space/space_article/stats.dart'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class SpaceArticleItem { - int? id; - Category? category; - List? categories; String? title; - String? summary; - String? bannerUrl; - int? templateId; - int? state; - Author? author; - int? reprint; - List? imageUrls; - int? publishTime; - int? ctime; - int? mtime; Stats? stats; - int? attributes; - int? words; List? 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; String? uri; - String? param; - String? goto; String? publishTimeText; - String? dynam1c; SpaceArticleItem({ - 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.attributes, - 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.uri, - this.param, - this.goto, this.publishTimeText, - this.dynam1c, }); factory SpaceArticleItem.fromJson(Map json) => SpaceArticleItem( - id: json['id'] as int?, - category: json['category'] == null - ? null - : Category.fromJson(json['category'] as Map), - categories: (json['categories'] as List?) - ?.map((e) => Category.fromJson(e as Map)) - .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 - : Author.fromJson(json['author'] as Map), - reprint: json['reprint'] as int?, - imageUrls: (json['image_urls'] as List?)?.fromCast(), - 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), - attributes: json['attributes'] as int?, - words: json['words'] as int?, originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(), - list: json['list'] as dynamic, - isLike: json['is_like'] as bool?, - media: json['media'] == null - ? null - : Media.fromJson(json['media'] as Map), - 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?, uri: json['uri'] as String?, - param: json['param'] as String?, - goto: json['goto'] as String?, publishTimeText: json['publish_time_text'] as String?, - dynam1c: json['dynamic'] as String?, ); } diff --git a/lib/models_new/space/space_article/list.dart b/lib/models_new/space/space_article/list.dart deleted file mode 100644 index 11b8659a1..000000000 --- a/lib/models_new/space/space_article/list.dart +++ /dev/null @@ -1,45 +0,0 @@ -class SpaceArticleList { - int? id; - int? mid; - String? name; - String? imageUrl; - int? updateTime; - int? ctime; - int? publishTime; - String? summary; - int? words; - int? read; - int? articlesCount; - String? updateTimeText; - - SpaceArticleList({ - this.id, - this.mid, - this.name, - this.imageUrl, - this.updateTime, - this.ctime, - this.publishTime, - this.summary, - this.words, - this.read, - this.articlesCount, - this.updateTimeText, - }); - - factory SpaceArticleList.fromJson(Map json) => - SpaceArticleList( - 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?, - updateTimeText: json['update_time_text'] as String?, - ); -} diff --git a/lib/models_new/space/space_article/media.dart b/lib/models_new/space/space_article/media.dart deleted file mode 100644 index 64a3ffabc..000000000 --- a/lib/models_new/space/space_article/media.dart +++ /dev/null @@ -1,32 +0,0 @@ -class Media { - int? score; - int? mediaId; - String? title; - String? cover; - String? area; - int? typeId; - String? typeName; - int? spoiler; - - Media({ - this.score, - this.mediaId, - this.title, - this.cover, - this.area, - this.typeId, - this.typeName, - this.spoiler, - }); - - factory Media.fromJson(Map 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?, - ); -} diff --git a/lib/models_new/space/space_article/stats.dart b/lib/models_new/space/space_article/stats.dart index 590b8c79a..58471864c 100644 --- a/lib/models_new/space/space_article/stats.dart +++ b/lib/models_new/space/space_article/stats.dart @@ -1,32 +1,14 @@ class Stats { int? view; - int? favorite; - int? like; - int? dislike; int? reply; - int? share; - num? coin; - int? dynam1c; Stats({ this.view, - this.favorite, - this.like, - this.dislike, this.reply, - this.share, - this.coin, - this.dynam1c, }); factory Stats.fromJson(Map 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 num?, - dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/space/space_audio/data.dart b/lib/models_new/space/space_audio/data.dart index d6ba1999e..a173e915c 100644 --- a/lib/models_new/space/space_audio/data.dart +++ b/lib/models_new/space/space_audio/data.dart @@ -1,25 +1,16 @@ import 'package:PiliPlus/models_new/space/space_audio/item.dart'; class SpaceAudioData { - int? curPage; - int? pageCount; int? totalSize; - int? pageSize; List? items; SpaceAudioData({ - this.curPage, - this.pageCount, this.totalSize, - this.pageSize, this.items, }); factory SpaceAudioData.fromJson(Map json) => SpaceAudioData( - curPage: json['curPage'] as int?, - pageCount: json['pageCount'] as int?, totalSize: json['totalSize'] as int?, - pageSize: json['pageSize'] as int?, items: (json['data'] as List?) ?.map((e) => SpaceAudioItem.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/space/space_audio/item.dart b/lib/models_new/space/space_audio/item.dart index 901706419..9fff691bf 100644 --- a/lib/models_new/space/space_audio/item.dart +++ b/lib/models_new/space/space_audio/item.dart @@ -3,88 +3,37 @@ import 'package:PiliPlus/models_new/space/space_audio/statistic.dart'; class SpaceAudioItem { int? id; int? uid; - String? uname; - String? author; String? title; String? cover; - String? intro; - String? lyric; - int? crtype; - int? duration; - int? passtime; - int? curtime; int? aid; String? bvid; int? cid; - int? msid; - int? attr; - int? limit; - int? activityId; - String? limitdesc; - num? coinNum; int? ctime; Statistic? statistic; - dynamic vipInfo; - dynamic collectIds; - int? isCooper; SpaceAudioItem({ this.id, this.uid, - this.uname, - this.author, this.title, this.cover, - this.intro, - this.lyric, - this.crtype, - this.duration, - this.passtime, - this.curtime, this.aid, this.bvid, this.cid, - this.msid, - this.attr, - this.limit, - this.activityId, - this.limitdesc, - this.coinNum, this.ctime, this.statistic, - this.vipInfo, - this.collectIds, - this.isCooper, }); factory SpaceAudioItem.fromJson(Map json) => SpaceAudioItem( id: json['id'] as int?, uid: json['uid'] as int?, - uname: json['uname'] as String?, - author: json['author'] as String?, title: json['title'] as String?, cover: json['cover'] as String?, - intro: json['intro'] as String?, - lyric: json['lyric'] as String?, - crtype: json['crtype'] as int?, - duration: json['duration'] as int?, - passtime: json['passtime'] as int?, - curtime: json['curtime'] as int?, aid: json['aid'] as int?, bvid: json['bvid'] as String?, cid: json['cid'] as int?, - msid: json['msid'] as int?, - attr: json['attr'] as int?, - limit: json['limit'] as int?, - activityId: json['activityId'] as int?, - limitdesc: json['limitdesc'] as String?, - coinNum: json['coin_num'] as num?, ctime: json['ctime'] as int?, statistic: json['statistic'] == null ? null : Statistic.fromJson(json['statistic'] as Map), - vipInfo: json['vipInfo'] as dynamic, - collectIds: json['collectIds'] as dynamic, - isCooper: json['is_cooper'] as int?, ); } diff --git a/lib/models_new/space/space_audio/statistic.dart b/lib/models_new/space/space_audio/statistic.dart index fc4e5bb14..ea9539bd8 100644 --- a/lib/models_new/space/space_audio/statistic.dart +++ b/lib/models_new/space/space_audio/statistic.dart @@ -1,17 +1,11 @@ class Statistic { - int? sid; int? play; - int? collect; int? comment; - int? share; - Statistic({this.sid, this.play, this.collect, this.comment, this.share}); + Statistic({this.play, this.comment}); factory Statistic.fromJson(Map json) => Statistic( - sid: json['sid'] as int?, play: json['play'] as int?, - collect: json['collect'] as int?, comment: json['comment'] as int?, - share: json['share'] as int?, ); } diff --git a/lib/models_new/space/space_cheese/item.dart b/lib/models_new/space/space_cheese/item.dart index d5bc1a481..e81820931 100644 --- a/lib/models_new/space/space_cheese/item.dart +++ b/lib/models_new/space/space_cheese/item.dart @@ -1,49 +1,28 @@ import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class SpaceCheeseItem { - bool? cooperated; - String? cooperationMark; String? cover; - int? epCount; - String? link; List? marks; - int? page; - int? play; int? seasonId; String? status; - String? subtitle; String? title; String? ctime; SpaceCheeseItem({ - this.cooperated, - this.cooperationMark, this.cover, - this.epCount, - this.link, this.marks, - this.page, - this.play, this.seasonId, this.status, - this.subtitle, this.title, this.ctime, }); factory SpaceCheeseItem.fromJson(Map json) => SpaceCheeseItem( - cooperated: json['cooperated'] as bool?, - cooperationMark: json['cooperation_mark'] as String?, cover: json['cover'] as String?, - epCount: json['ep_count'] as int?, - link: json['link'] as String?, marks: (json['marks'] as List?)?.fromCast(), - page: json['page'] as int?, - play: json['play'] as int?, seasonId: json['season_id'] as int?, status: json['status'] as String?, - subtitle: json['subtitle'] as String?, title: json['title'] as String?, ctime: json['ctime'] as String?, ); diff --git a/lib/models_new/space/space_cheese/page.dart b/lib/models_new/space/space_cheese/page.dart index a2dd06ed7..3d5bb34c7 100644 --- a/lib/models_new/space/space_cheese/page.dart +++ b/lib/models_new/space/space_cheese/page.dart @@ -1,16 +1,10 @@ class SpaceCheesePage { bool? next; - int? num; - int? size; - int? total; - SpaceCheesePage({this.next, this.num, this.size, this.total}); + SpaceCheesePage({this.next}); factory SpaceCheesePage.fromJson(Map json) => SpaceCheesePage( next: json['next'] as bool?, - num: json['num'] as int?, - size: json['size'] as int?, - total: json['total'] as int?, ); } diff --git a/lib/models_new/space/space_fav/data.dart b/lib/models_new/space/space_fav/data.dart index ab13fcd10..744963b7a 100644 --- a/lib/models_new/space/space_fav/data.dart +++ b/lib/models_new/space/space_fav/data.dart @@ -4,9 +4,8 @@ class SpaceFavData { int? id; String? name; MediaListResponse? mediaListResponse; - String? uri; - SpaceFavData({this.id, this.name, this.mediaListResponse, this.uri}); + SpaceFavData({this.id, this.name, this.mediaListResponse}); factory SpaceFavData.fromJson(Map json) => SpaceFavData( id: json['id'] as int?, @@ -16,6 +15,5 @@ class SpaceFavData { : MediaListResponse.fromJson( json['mediaListResponse'] as Map, ), - uri: json['uri'] as String?, ); } diff --git a/lib/models_new/space/space_fav/list.dart b/lib/models_new/space/space_fav/list.dart index df53dfba6..474db45b3 100644 --- a/lib/models_new/space/space_fav/list.dart +++ b/lib/models_new/space/space_fav/list.dart @@ -14,7 +14,6 @@ class SpaceFavItemModel extends SubItemModel { super.fid, super.mid, super.attr, - super.attrDesc, super.title, super.cover, super.upper, @@ -26,13 +25,7 @@ class SpaceFavItemModel extends SubItemModel { super.favState, super.mediaCount, super.viewCount, - super.vt, - super.isTop, - super.recentFav, - super.playSwitch, super.type, - super.link, - super.bvid, }); factory SpaceFavItemModel.fromJson(Map json) => @@ -44,7 +37,6 @@ class SpaceFavItemModel extends SubItemModel { 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 @@ -58,12 +50,6 @@ class SpaceFavItemModel extends SubItemModel { 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?, ); } diff --git a/lib/models_new/space/space_fav/media_list_response.dart b/lib/models_new/space/space_fav/media_list_response.dart index 09e2bc9c7..8d5abb092 100644 --- a/lib/models_new/space/space_fav/media_list_response.dart +++ b/lib/models_new/space/space_fav/media_list_response.dart @@ -3,9 +3,8 @@ import 'package:PiliPlus/models_new/space/space_fav/list.dart'; class MediaListResponse { int? count; List? list; - bool? hasMore; - MediaListResponse({this.count, this.list, this.hasMore}); + MediaListResponse({this.count, this.list}); factory MediaListResponse.fromJson(Map json) { return MediaListResponse( @@ -13,7 +12,6 @@ class MediaListResponse { list: (json['list'] as List?) ?.map((e) => SpaceFavItemModel.fromJson(e as Map)) .toList(), - hasMore: json['has_more'] as bool?, ); } } diff --git a/lib/models_new/space/space_opus/cover.dart b/lib/models_new/space/space_opus/cover.dart index f2692b7fd..e0045c84a 100644 --- a/lib/models_new/space/space_opus/cover.dart +++ b/lib/models_new/space/space_opus/cover.dart @@ -1,19 +1,17 @@ import 'package:flutter/foundation.dart'; class Cover { - int? height; String? url; - int? width; late double ratio; - Cover({this.height, this.url, this.width, required this.ratio}); + Cover({required this.ratio}); Cover.fromJson(Map json) { - height = json['height'] as int?; url = json['url'] as String?; - width = json['width'] as int?; + final height = json['height'] as int?; + final width = json['width'] as int?; if (height != null && width != null) { - ratio = clampDouble(height! / width!, 0.68, 2.7); + ratio = clampDouble(height / width, 0.68, 2.7); } else { ratio = 1; } diff --git a/lib/models_new/space/space_opus/data.dart b/lib/models_new/space/space_opus/data.dart index 75a6d3456..19faf92a7 100644 --- a/lib/models_new/space/space_opus/data.dart +++ b/lib/models_new/space/space_opus/data.dart @@ -4,9 +4,8 @@ class SpaceOpusData { bool? hasMore; List? items; String? offset; - int? updateNum; - SpaceOpusData({this.hasMore, this.items, this.offset, this.updateNum}); + SpaceOpusData({this.hasMore, this.items, this.offset}); factory SpaceOpusData.fromJson(Map json) => SpaceOpusData( hasMore: json['has_more'] as bool?, @@ -14,6 +13,5 @@ class SpaceOpusData { ?.map((e) => SpaceOpusItemModel.fromJson(e as Map)) .toList(), offset: json['offset'] as String?, - updateNum: json['update_num'] as int?, ); } diff --git a/lib/models_new/space/space_opus/item.dart b/lib/models_new/space/space_opus/item.dart index 820792fde..6fe9cd7c3 100644 --- a/lib/models_new/space/space_opus/item.dart +++ b/lib/models_new/space/space_opus/item.dart @@ -3,14 +3,12 @@ import 'package:PiliPlus/models_new/space/space_opus/stat.dart'; class SpaceOpusItemModel { String? content; - String? jumpUrl; String? opusId; Stat? stat; Cover? cover; SpaceOpusItemModel({ this.content, - this.jumpUrl, this.opusId, this.stat, this.cover, @@ -19,7 +17,6 @@ class SpaceOpusItemModel { factory SpaceOpusItemModel.fromJson(Map json) => SpaceOpusItemModel( content: json['content'] as String?, - jumpUrl: json['jump_url'] as String?, opusId: json['opus_id'] as String?, stat: json['stat'] == null ? null diff --git a/lib/models_new/space/space_season_series/archive.dart b/lib/models_new/space/space_season_series/archive.dart deleted file mode 100644 index 41a9f693d..000000000 --- a/lib/models_new/space/space_season_series/archive.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:PiliPlus/models_new/space/space_season_series/stat.dart'; - -class SpaceSsArchive { - int? aid; - String? bvid; - int? ctime; - int? duration; - bool? enableVt; - bool? interactiveVideo; - String? pic; - int? playbackPosition; - int? pubdate; - SpaceSsStat? stat; - int? state; - String? title; - int? ugcPay; - String? vtDisplay; - int? isLessonVideo; - - SpaceSsArchive({ - this.aid, - this.bvid, - this.ctime, - this.duration, - this.enableVt, - this.interactiveVideo, - this.pic, - this.playbackPosition, - this.pubdate, - this.stat, - this.state, - this.title, - this.ugcPay, - this.vtDisplay, - this.isLessonVideo, - }); - - factory SpaceSsArchive.fromJson(Map json) => SpaceSsArchive( - aid: json["aid"], - bvid: json["bvid"], - ctime: json["ctime"], - duration: json["duration"], - enableVt: json["enable_vt"], - interactiveVideo: json["interactive_video"], - pic: json["pic"], - playbackPosition: json["playback_position"], - pubdate: json["pubdate"], - stat: json["stat"] == null ? null : SpaceSsStat.fromJson(json["stat"]), - state: json["state"], - title: json["title"], - ugcPay: json["ugc_pay"], - vtDisplay: json["vt_display"], - isLessonVideo: json["is_lesson_video"], - ); -} diff --git a/lib/models_new/space/space_season_series/stat.dart b/lib/models_new/space/space_season_series/meta.dart similarity index 54% rename from lib/models_new/space/space_season_series/stat.dart rename to lib/models_new/space/space_season_series/meta.dart index a9dfe5073..69e2eab2f 100644 --- a/lib/models_new/space/space_season_series/stat.dart +++ b/lib/models_new/space/space_season_series/meta.dart @@ -1,23 +1,5 @@ -class SpaceSsStat { - int? view; - int? vt; - - SpaceSsStat({ - this.view, - this.vt, - }); - - factory SpaceSsStat.fromJson(Map json) => SpaceSsStat( - view: json["view"], - vt: json["vt"], - ); -} - class SpaceSsMeta { - int? category; String? cover; - String? description; - int? mid; String? name; int? ptime; int? total; @@ -25,10 +7,7 @@ class SpaceSsMeta { dynamic seriesId; SpaceSsMeta({ - this.category, this.cover, - this.description, - this.mid, this.name, this.ptime, this.total, @@ -37,10 +16,7 @@ class SpaceSsMeta { }); factory SpaceSsMeta.fromJson(Map json) => SpaceSsMeta( - category: json["category"], cover: json["cover"], - description: json["description"], - mid: json["mid"], name: json["name"], ptime: json["ptime"], total: json["total"], diff --git a/lib/models_new/space/space_season_series/page.dart b/lib/models_new/space/space_season_series/page.dart index 8ad41acd3..794213d42 100644 --- a/lib/models_new/space/space_season_series/page.dart +++ b/lib/models_new/space/space_season_series/page.dart @@ -1,17 +1,11 @@ class SpaceSsPage { - int? pageNum; - int? pageSize; int? total; SpaceSsPage({ - this.pageNum, - this.pageSize, this.total, }); factory SpaceSsPage.fromJson(Map json) => SpaceSsPage( - pageNum: json["page_num"], - pageSize: json["page_size"], total: json["total"], ); } diff --git a/lib/models_new/space/space_season_series/season.dart b/lib/models_new/space/space_season_series/season.dart index 03ead644b..1cb263569 100644 --- a/lib/models_new/space/space_season_series/season.dart +++ b/lib/models_new/space/space_season_series/season.dart @@ -1,23 +1,11 @@ -import 'package:PiliPlus/models_new/space/space_season_series/archive.dart'; -import 'package:PiliPlus/models_new/space/space_season_series/stat.dart'; -import 'package:PiliPlus/utils/extension/iterable_ext.dart'; +import 'package:PiliPlus/models_new/space/space_season_series/meta.dart'; class SpaceSsModel { - List? archives; SpaceSsMeta? meta; - List? recentAids; - SpaceSsModel({ - this.archives, - this.meta, - this.recentAids, - }); + SpaceSsModel({this.meta}); factory SpaceSsModel.fromJson(Map json) => SpaceSsModel( - archives: (json["archives"] as List?) - ?.map((e) => SpaceSsArchive.fromJson(e)) - .toList(), meta: json["meta"] == null ? null : SpaceSsMeta.fromJson(json["meta"]), - recentAids: (json["recent_aids"] as List?)?.fromCast(), ); } diff --git a/lib/models_new/space/space_shop/below_label.dart b/lib/models_new/space/space_shop/below_label.dart index a016458f5..c54b428a3 100644 --- a/lib/models_new/space/space_shop/below_label.dart +++ b/lib/models_new/space/space_shop/below_label.dart @@ -1,44 +1,11 @@ class BelowLabel { - int? tagType; String? title; - String? titleDayColor1; - String? titleDayColor2; - String? titleNightColor1; - String? titleNightColor2; - int? cornerRadius; - int? useBoard; - String? backDayColor1; - String? backDayColor2; - String? backNightColor1; - String? backNightColor2; BelowLabel({ - this.tagType, this.title, - this.titleDayColor1, - this.titleDayColor2, - this.titleNightColor1, - this.titleNightColor2, - this.cornerRadius, - this.useBoard, - this.backDayColor1, - this.backDayColor2, - this.backNightColor1, - this.backNightColor2, }); factory BelowLabel.fromJson(Map json) => BelowLabel( - tagType: json['tagType'] as int?, title: json['title'] as String?, - titleDayColor1: json['titleDayColor1'] as String?, - titleDayColor2: json['titleDayColor2'] as String?, - titleNightColor1: json['titleNightColor1'] as String?, - titleNightColor2: json['titleNightColor2'] as String?, - cornerRadius: json['cornerRadius'] as int?, - useBoard: json['useBoard'] as int?, - backDayColor1: json['backDayColor1'] as String?, - backDayColor2: json['backDayColor2'] as String?, - backNightColor1: json['backNightColor1'] as String?, - backNightColor2: json['backNightColor2'] as String?, ); } diff --git a/lib/models_new/space/space_shop/cover.dart b/lib/models_new/space/space_shop/cover.dart index be2fe0096..6463e3786 100644 --- a/lib/models_new/space/space_shop/cover.dart +++ b/lib/models_new/space/space_shop/cover.dart @@ -1,17 +1,9 @@ class Cover { String? url; - String? imgWh; - int? height; - int? width; - dynamic size; - Cover({this.url, this.imgWh, this.height, this.width, this.size}); + Cover({this.url}); factory Cover.fromJson(Map json) => Cover( url: json['url'] as String?, - imgWh: json['imgWH'] as String?, - height: json['height'] as int?, - width: json['width'] as int?, - size: json['size'] as dynamic, ); } diff --git a/lib/models_new/space/space_shop/data.dart b/lib/models_new/space/space_shop/data.dart index 16f4f4d56..543050ed4 100644 --- a/lib/models_new/space/space_shop/data.dart +++ b/lib/models_new/space/space_shop/data.dart @@ -6,7 +6,6 @@ class SpaceShopData { String? clickUrl; String? showMoreDesc; bool? haveNextPage; - int? nextSearchAfter; SpaceShopData({ this.data, @@ -14,7 +13,6 @@ class SpaceShopData { this.clickUrl, this.showMoreDesc, this.haveNextPage, - this.nextSearchAfter, }); factory SpaceShopData.fromJson(Map json) => SpaceShopData( @@ -25,6 +23,5 @@ class SpaceShopData { clickUrl: json['clickUrl'] as String?, showMoreDesc: json['showMoreDesc'] as String?, haveNextPage: json['haveNextPage'] as bool?, - nextSearchAfter: json['nextSearchAfter'] as int?, ); } diff --git a/lib/models_new/space/space_shop/item.dart b/lib/models_new/space/space_shop/item.dart index c9b20c0ea..c4115d6a1 100644 --- a/lib/models_new/space/space_shop/item.dart +++ b/lib/models_new/space/space_shop/item.dart @@ -2,143 +2,41 @@ import 'package:PiliPlus/models_new/space/space_shop/below_label.dart'; import 'package:PiliPlus/models_new/space/space_shop/benefit_info.dart'; import 'package:PiliPlus/models_new/space/space_shop/cover.dart'; import 'package:PiliPlus/models_new/space/space_shop/net_price.dart'; -import 'package:PiliPlus/models_new/space/space_shop/report_params.dart'; -import 'package:PiliPlus/models_new/space/space_shop/source_desc.dart'; -import 'package:PiliPlus/models_new/space/space_shop/source_front_tag.dart'; -import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class SpaceShopItem { - String? contentId; - int? contentType; - dynamic contentSubType; - dynamic trackId; Cover? cover; String? title; - dynamic subTitle; String? cardUrl; List? belowLabels; - dynamic topRightLabels; - dynamic bottomRightLabels; - dynamic topLeftLabels; - dynamic bottomLeftLabels; - List? titleFrontLabels; - dynamic priceBehindLabels; NetPrice? netPrice; - dynamic userInteractInfos; List? benefitInfos; - ReportParams? reportParams; - dynamic ichibanItem; - bool? isMarketItem; - dynamic remainBoxStr; - dynamic surpriseTips; - String? outSchemaUrl; - int? itemCode; - dynamic merchantId; - int? itemSource; String? itemSourceName; - SourceDesc? sourceDesc; - SourceFrontTag? sourceFrontTag; - List? openWhiteList; - bool? sellOut; - int? status; - bool? preSaleEnd; - bool? preSaleNotStart; - int? jumpType; - dynamic lrpriceStr; SpaceShopItem({ - this.contentId, - this.contentType, - this.contentSubType, - this.trackId, this.cover, this.title, - this.subTitle, this.cardUrl, this.belowLabels, - this.topRightLabels, - this.bottomRightLabels, - this.topLeftLabels, - this.bottomLeftLabels, - this.titleFrontLabels, - this.priceBehindLabels, this.netPrice, - this.userInteractInfos, this.benefitInfos, - this.reportParams, - this.ichibanItem, - this.isMarketItem, - this.remainBoxStr, - this.surpriseTips, - this.outSchemaUrl, - this.itemCode, - this.merchantId, - this.itemSource, this.itemSourceName, - this.sourceDesc, - this.sourceFrontTag, - this.openWhiteList, - this.sellOut, - this.status, - this.preSaleEnd, - this.preSaleNotStart, - this.jumpType, - this.lrpriceStr, }); factory SpaceShopItem.fromJson(Map json) => SpaceShopItem( - contentId: json['contentId'] as String?, - contentType: json['contentType'] as int?, - contentSubType: json['contentSubType'] as dynamic, - trackId: json['trackId'] as dynamic, cover: json['cover'] == null ? null : Cover.fromJson(json['cover'] as Map), title: json['title'] as String?, - subTitle: json['subTitle'] as dynamic, cardUrl: json['cardUrl'] as String?, belowLabels: (json['belowLabels'] as List?) ?.map((e) => BelowLabel.fromJson(e as Map)) .toList(), - topRightLabels: json['topRightLabels'] as dynamic, - bottomRightLabels: json['bottomRightLabels'] as dynamic, - topLeftLabels: json['topLeftLabels'] as dynamic, - bottomLeftLabels: json['bottomLeftLabels'] as dynamic, - titleFrontLabels: json['titleFrontLabels'] as List?, - priceBehindLabels: json['priceBehindLabels'] as dynamic, netPrice: json['netPrice'] == null ? null : NetPrice.fromJson(json['netPrice'] as Map), - userInteractInfos: json['userInteractInfos'] as dynamic, benefitInfos: (json['benefitInfos'] as List?) ?.map((e) => BenefitInfo.fromJson(e as Map)) .toList(), - reportParams: json['reportParams'] == null - ? null - : ReportParams.fromJson(json['reportParams'] as Map), - ichibanItem: json['ichibanItem'] as dynamic, - isMarketItem: json['isMarketItem'] as bool?, - remainBoxStr: json['remainBoxStr'] as dynamic, - surpriseTips: json['surpriseTips'] as dynamic, - outSchemaUrl: json['outSchemaUrl'] as String?, - itemCode: json['itemCode'] as int?, - merchantId: json['merchantId'] as dynamic, - itemSource: json['itemSource'] as int?, itemSourceName: json['itemSourceName'] as String?, - sourceDesc: json['sourceDesc'] == null - ? null - : SourceDesc.fromJson(json['sourceDesc'] as Map), - sourceFrontTag: json['sourceFrontTag'] == null - ? null - : SourceFrontTag.fromJson( - json['sourceFrontTag'] as Map, - ), - openWhiteList: (json['openWhiteList'] as List?)?.fromCast(), - sellOut: json['sellOut'] as bool?, - status: json['status'] as int?, - preSaleEnd: json['preSaleEnd'] as bool?, - preSaleNotStart: json['preSaleNotStart'] as bool?, - jumpType: json['jumpType'] as int?, - lrpriceStr: json['lrpriceStr'] as dynamic, ); } diff --git a/lib/models_new/space/space_shop/report_params.dart b/lib/models_new/space/space_shop/report_params.dart deleted file mode 100644 index 41a20f346..000000000 --- a/lib/models_new/space/space_shop/report_params.dart +++ /dev/null @@ -1,11 +0,0 @@ -class ReportParams { - String? trail; - String? trackId; - - ReportParams({this.trail, this.trackId}); - - factory ReportParams.fromJson(Map json) => ReportParams( - trail: json['trail'] as String?, - trackId: json['track_id'] as String?, - ); -} diff --git a/lib/models_new/space/space_shop/source_desc.dart b/lib/models_new/space/space_shop/source_desc.dart deleted file mode 100644 index 659fff6c2..000000000 --- a/lib/models_new/space/space_shop/source_desc.dart +++ /dev/null @@ -1,44 +0,0 @@ -class SourceDesc { - int? tagType; - String? title; - String? titleDayColor1; - String? titleDayColor2; - String? titleNightColor1; - String? titleNightColor2; - int? cornerRadius; - int? useBoard; - String? backDayColor1; - String? backDayColor2; - String? backNightColor1; - String? backNightColor2; - - SourceDesc({ - this.tagType, - this.title, - this.titleDayColor1, - this.titleDayColor2, - this.titleNightColor1, - this.titleNightColor2, - this.cornerRadius, - this.useBoard, - this.backDayColor1, - this.backDayColor2, - this.backNightColor1, - this.backNightColor2, - }); - - factory SourceDesc.fromJson(Map json) => SourceDesc( - tagType: json['tagType'] as int?, - title: json['title'] as String?, - titleDayColor1: json['titleDayColor1'] as String?, - titleDayColor2: json['titleDayColor2'] as String?, - titleNightColor1: json['titleNightColor1'] as String?, - titleNightColor2: json['titleNightColor2'] as String?, - cornerRadius: json['cornerRadius'] as int?, - useBoard: json['useBoard'] as int?, - backDayColor1: json['backDayColor1'] as String?, - backDayColor2: json['backDayColor2'] as String?, - backNightColor1: json['backNightColor1'] as String?, - backNightColor2: json['backNightColor2'] as String?, - ); -} diff --git a/lib/models_new/space/space_shop/source_front_tag.dart b/lib/models_new/space/space_shop/source_front_tag.dart deleted file mode 100644 index a79c6e236..000000000 --- a/lib/models_new/space/space_shop/source_front_tag.dart +++ /dev/null @@ -1,46 +0,0 @@ -class SourceFrontTag { - int? tagType; - String? title; - String? titleDayColor1; - String? titleDayColor2; - String? titleNightColor1; - String? titleNightColor2; - int? cornerRadius; - int? useBoard; - String? backDayColor1; - String? backDayColor2; - String? backNightColor1; - String? backNightColor2; - - SourceFrontTag({ - this.tagType, - this.title, - this.titleDayColor1, - this.titleDayColor2, - this.titleNightColor1, - this.titleNightColor2, - this.cornerRadius, - this.useBoard, - this.backDayColor1, - this.backDayColor2, - this.backNightColor1, - this.backNightColor2, - }); - - factory SourceFrontTag.fromJson(Map json) { - return SourceFrontTag( - tagType: json['tagType'] as int?, - title: json['title'] as String?, - titleDayColor1: json['titleDayColor1'] as String?, - titleDayColor2: json['titleDayColor2'] as String?, - titleNightColor1: json['titleNightColor1'] as String?, - titleNightColor2: json['titleNightColor2'] as String?, - cornerRadius: json['cornerRadius'] as int?, - useBoard: json['useBoard'] as int?, - backDayColor1: json['backDayColor1'] as String?, - backDayColor2: json['backDayColor2'] as String?, - backNightColor1: json['backNightColor1'] as String?, - backNightColor2: json['backNightColor2'] as String?, - ); - } -} diff --git a/lib/models_new/space_setting/data.dart b/lib/models_new/space_setting/data.dart index 7dd0a4612..75e94ff51 100644 --- a/lib/models_new/space_setting/data.dart +++ b/lib/models_new/space_setting/data.dart @@ -2,17 +2,13 @@ import 'package:PiliPlus/models_new/space_setting/privacy.dart'; class SpaceSettingData { Privacy? privacy; - bool? showNftSwitch; - String? exclusiveUrl; - SpaceSettingData({this.privacy, this.showNftSwitch, this.exclusiveUrl}); + SpaceSettingData({this.privacy}); factory SpaceSettingData.fromJson(Map json) => SpaceSettingData( privacy: json['privacy'] == null ? null : Privacy.fromJson(json['privacy'] as Map), - showNftSwitch: json['show_nft_switch'] as bool?, - exclusiveUrl: json['exclusive_url'] as String?, ); } diff --git a/lib/models_new/sub/sub/data.dart b/lib/models_new/sub/sub/data.dart index 67c8e77f5..878e689b3 100644 --- a/lib/models_new/sub/sub/data.dart +++ b/lib/models_new/sub/sub/data.dart @@ -1,14 +1,12 @@ import 'package:PiliPlus/models_new/sub/sub/list.dart'; class SubData { - int? count; List? list; bool? hasMore; - SubData({this.count, this.list, this.hasMore}); + SubData({this.list, this.hasMore}); factory SubData.fromJson(Map json) => SubData( - count: json['count'] as int?, list: (json['list'] as List?) ?.map((e) => SubItemModel.fromJson(e as Map)) .toList(), diff --git a/lib/models_new/sub/sub/list.dart b/lib/models_new/sub/sub/list.dart index 4d3a58602..b5f8eaaf3 100644 --- a/lib/models_new/sub/sub/list.dart +++ b/lib/models_new/sub/sub/list.dart @@ -6,7 +6,6 @@ class SubItemModel { int? fid; int? mid; int? attr; - String? attrDesc; String? title; String? cover; Owner? upper; @@ -18,13 +17,7 @@ class SubItemModel { int? favState; int? mediaCount; int? viewCount; - int? vt; - bool? isTop; - dynamic recentFav; - int? playSwitch; int? type; - String? link; - String? bvid; CntInfo? cntInfo; SubItemModel({ @@ -32,7 +25,6 @@ class SubItemModel { this.fid, this.mid, this.attr, - this.attrDesc, this.title, this.cover, this.upper, @@ -44,13 +36,7 @@ class SubItemModel { this.favState, this.mediaCount, this.viewCount, - this.vt, - this.isTop, - this.recentFav, - this.playSwitch, this.type, - this.link, - this.bvid, this.cntInfo, }); @@ -59,7 +45,6 @@ class SubItemModel { 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 @@ -73,13 +58,7 @@ class SubItemModel { 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?, cntInfo: json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info']), diff --git a/lib/models_new/sub/sub_detail/media.dart b/lib/models_new/sub/sub_detail/media.dart index 5e46ee428..0567089d1 100644 --- a/lib/models_new/sub/sub_detail/media.dart +++ b/lib/models_new/sub/sub_detail/media.dart @@ -1,4 +1,3 @@ -import 'package:PiliPlus/models/model_owner.dart'; import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart'; class SubDetailItemModel { @@ -8,11 +7,7 @@ class SubDetailItemModel { int? duration; int? pubtime; String? bvid; - Owner? upper; CntInfo? cntInfo; - int? enableVt; - String? vtDisplay; - bool? isSelfView; SubDetailItemModel({ this.id, @@ -21,11 +16,7 @@ class SubDetailItemModel { this.duration, this.pubtime, this.bvid, - this.upper, this.cntInfo, - this.enableVt, - this.vtDisplay, - this.isSelfView, }); factory SubDetailItemModel.fromJson(Map json) => @@ -36,14 +27,8 @@ class SubDetailItemModel { duration: json['duration'] as int?, pubtime: json['pubtime'] as int?, bvid: json['bvid'] as String?, - upper: json['upper'] == null - ? null - : Owner.fromJson(json['upper'] as Map), cntInfo: json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info'] as Map), - enableVt: json['enable_vt'] as int?, - vtDisplay: json['vt_display'] as String?, - isSelfView: json['is_self_view'] as bool?, ); } diff --git a/lib/models_new/triple/ugc_triple.dart b/lib/models_new/triple/ugc_triple.dart index 80425d678..f59e9f99c 100644 --- a/lib/models_new/triple/ugc_triple.dart +++ b/lib/models_new/triple/ugc_triple.dart @@ -3,18 +3,12 @@ class UgcTriple { bool? coin; bool? fav; int? multiply; - bool? isRisk; - int? gaiaResType; - dynamic gaiaData; UgcTriple({ this.like, this.coin, this.fav, this.multiply, - this.isRisk, - this.gaiaResType, - this.gaiaData, }); factory UgcTriple.fromJson(Map json) => UgcTriple( @@ -22,8 +16,5 @@ class UgcTriple { coin: json["coin"], fav: json["fav"], multiply: json["multiply"], - isRisk: json["is_risk"], - gaiaResType: json["gaia_res_type"], - gaiaData: json["gaia_data"], ); } diff --git a/lib/models_new/upower_rank/data.dart b/lib/models_new/upower_rank/data.dart index 54d4e3bb7..c75ffb65d 100644 --- a/lib/models_new/upower_rank/data.dart +++ b/lib/models_new/upower_rank/data.dart @@ -1,43 +1,25 @@ import 'package:PiliPlus/models_new/upower_rank/level_info.dart'; import 'package:PiliPlus/models_new/upower_rank/rank_info.dart'; -import 'package:PiliPlus/models_new/upower_rank/up_info.dart'; -import 'package:PiliPlus/models_new/upower_rank/user_info.dart'; import 'package:PiliPlus/utils/extension/iterable_ext.dart'; class UpowerRankData { - UpInfo? upInfo; List? rankInfo; - UserInfo? userInfo; - int? memberTotal; int? privilegeType; - bool? isCharge; List? tabs; List? levelInfo; UpowerRankData({ - this.upInfo, this.rankInfo, - this.userInfo, - this.memberTotal, this.privilegeType, - this.isCharge, this.tabs, this.levelInfo, }); factory UpowerRankData.fromJson(Map json) => UpowerRankData( - upInfo: json['up_info'] == null - ? null - : UpInfo.fromJson(json['up_info'] as Map), rankInfo: (json['rank_info'] as List?) ?.map((e) => UpowerRankInfo.fromJson(e as Map)) .toList(), - userInfo: json['user_info'] == null - ? null - : UserInfo.fromJson(json['user_info'] as Map), - memberTotal: json['member_total'] as int?, privilegeType: json['privilege_type'] as int?, - isCharge: json['is_charge'] as bool?, tabs: (json['tabs'] as List?)?.fromCast(), levelInfo: (json['level_info'] as List?) ?.map((e) => LevelInfo.fromJson(e as Map)) diff --git a/lib/models_new/upower_rank/level_info.dart b/lib/models_new/upower_rank/level_info.dart index 4b0868c80..ad1547e40 100644 --- a/lib/models_new/upower_rank/level_info.dart +++ b/lib/models_new/upower_rank/level_info.dart @@ -1,15 +1,13 @@ class LevelInfo { int? privilegeType; String? name; - int? price; int? memberTotal; - LevelInfo({this.privilegeType, this.name, this.price, this.memberTotal}); + LevelInfo({this.privilegeType, this.name, this.memberTotal}); factory LevelInfo.fromJson(Map json) => LevelInfo( privilegeType: json['privilege_type'] as int?, name: json['name'] as String?, - price: json['price'] as int?, memberTotal: json['member_total'] as int?, ); } diff --git a/lib/models_new/upower_rank/rank_info.dart b/lib/models_new/upower_rank/rank_info.dart index 96923927d..ffe609838 100644 --- a/lib/models_new/upower_rank/rank_info.dart +++ b/lib/models_new/upower_rank/rank_info.dart @@ -2,28 +2,19 @@ class UpowerRankInfo { int? mid; String? nickname; String? avatar; - int? rank; int? day; - int? expireAt; - int? remainDays; UpowerRankInfo({ this.mid, this.nickname, this.avatar, - this.rank, this.day, - this.expireAt, - this.remainDays, }); factory UpowerRankInfo.fromJson(Map json) => UpowerRankInfo( mid: json['mid'] as int?, nickname: json['nickname'] as String?, avatar: json['avatar'] as String?, - rank: json['rank'] as int?, day: json['day'] as int?, - expireAt: json['expire_at'] as int?, - remainDays: json['remain_days'] as int?, ); } diff --git a/lib/models_new/upower_rank/up_info.dart b/lib/models_new/upower_rank/up_info.dart deleted file mode 100644 index 6a6afe97b..000000000 --- a/lib/models_new/upower_rank/up_info.dart +++ /dev/null @@ -1,26 +0,0 @@ -class UpInfo { - int? mid; - String? nickname; - String? avatar; - int? type; - String? title; - int? upowerState; - - UpInfo({ - this.mid, - this.nickname, - this.avatar, - this.type, - this.title, - this.upowerState, - }); - - factory UpInfo.fromJson(Map json) => UpInfo( - mid: json['mid'] as int?, - nickname: json['nickname'] as String?, - avatar: json['avatar'] as String?, - type: json['type'] as int?, - title: json['title'] as String?, - upowerState: json['upower_state'] as int?, - ); -} diff --git a/lib/models_new/upower_rank/user_info.dart b/lib/models_new/upower_rank/user_info.dart deleted file mode 100644 index 3d3f67924..000000000 --- a/lib/models_new/upower_rank/user_info.dart +++ /dev/null @@ -1,29 +0,0 @@ -class UserInfo { - int? mid; - String? nickname; - String? avatar; - int? rank; - int? day; - int? expireAt; - int? remainDays; - - UserInfo({ - this.mid, - this.nickname, - this.avatar, - this.rank, - this.day, - this.expireAt, - this.remainDays, - }); - - factory UserInfo.fromJson(Map json) => UserInfo( - mid: json['mid'] as int?, - nickname: json['nickname'] as String?, - avatar: json['avatar'] as String?, - rank: json['rank'] as int?, - day: json['day'] as int?, - expireAt: json['expire_at'] as int?, - remainDays: json['remain_days'] as int?, - ); -} diff --git a/lib/models_new/user_real_name/data.dart b/lib/models_new/user_real_name/data.dart index 250020405..7ea64237f 100644 --- a/lib/models_new/user_real_name/data.dart +++ b/lib/models_new/user_real_name/data.dart @@ -2,17 +2,13 @@ import 'package:PiliPlus/models_new/user_real_name/reject_page.dart'; class UserRealNameData { String? name; - String? namePrefix; - bool? show; RejectPage? rejectPage; - UserRealNameData({this.name, this.namePrefix, this.show, this.rejectPage}); + UserRealNameData({this.name, this.rejectPage}); factory UserRealNameData.fromJson(Map json) => UserRealNameData( name: json['name'] as String?, - namePrefix: json['name_prefix'] as String?, - show: json['show'] as bool?, rejectPage: json['reject_page'] == null ? null : RejectPage.fromJson(json['reject_page'] as Map), diff --git a/lib/models_new/user_real_name/reject_page.dart b/lib/models_new/user_real_name/reject_page.dart index 574171cf2..6696b399d 100644 --- a/lib/models_new/user_real_name/reject_page.dart +++ b/lib/models_new/user_real_name/reject_page.dart @@ -1,13 +1,11 @@ class RejectPage { String? title; String? text; - String? img; - RejectPage({this.title, this.text, this.img}); + RejectPage({this.title, this.text}); factory RejectPage.fromJson(Map json) => RejectPage( title: json['title'] as String?, text: json['text'] as String?, - img: json['img'] as String?, ); } diff --git a/lib/models_new/video/video_ai_conclusion/data.dart b/lib/models_new/video/video_ai_conclusion/data.dart index 9c38494b3..e289f7f58 100644 --- a/lib/models_new/video/video_ai_conclusion/data.dart +++ b/lib/models_new/video/video_ai_conclusion/data.dart @@ -1,33 +1,18 @@ import 'package:PiliPlus/models_new/video/video_ai_conclusion/model_result.dart'; class AiConclusionData { - int? code; AiConclusionResult? modelResult; - String? stid; - int? status; - int? likeNum; - int? dislikeNum; AiConclusionData({ - this.code, this.modelResult, - this.stid, - this.status, - this.likeNum, - this.dislikeNum, }); factory AiConclusionData.fromJson(Map json) => AiConclusionData( - code: json['code'] as int?, modelResult: json['model_result'] == null ? null : AiConclusionResult.fromJson( json['model_result'] as Map, ), - stid: json['stid'] as String?, - status: json['status'] as int?, - likeNum: json['like_num'] as int?, - dislikeNum: json['dislike_num'] as int?, ); } diff --git a/lib/models_new/video/video_ai_conclusion/model_result.dart b/lib/models_new/video/video_ai_conclusion/model_result.dart index d6caee563..646557bb1 100644 --- a/lib/models_new/video/video_ai_conclusion/model_result.dart +++ b/lib/models_new/video/video_ai_conclusion/model_result.dart @@ -1,28 +1,19 @@ import 'package:PiliPlus/models_new/video/video_ai_conclusion/outline.dart'; -import 'package:PiliPlus/models_new/video/video_ai_conclusion/subtitle.dart'; class AiConclusionResult { - int? resultType; String? summary; List? outline; - List? subtitle; AiConclusionResult({ - this.resultType, this.summary, this.outline, - this.subtitle, }); factory AiConclusionResult.fromJson(Map json) => AiConclusionResult( - resultType: json['result_type'] as int?, summary: json['summary'] as String?, outline: (json['outline'] as List?) ?.map((e) => Outline.fromJson(e as Map)) .toList(), - subtitle: (json['subtitle'] as List?) - ?.map((e) => Subtitle.fromJson(e as Map)) - .toList(), ); } diff --git a/lib/models_new/video/video_ai_conclusion/outline.dart b/lib/models_new/video/video_ai_conclusion/outline.dart index 724656b8c..893e0334f 100644 --- a/lib/models_new/video/video_ai_conclusion/outline.dart +++ b/lib/models_new/video/video_ai_conclusion/outline.dart @@ -3,15 +3,13 @@ import 'package:PiliPlus/models_new/video/video_ai_conclusion/part_outline.dart' class Outline { String? title; List? partOutline; - int? timestamp; - Outline({this.title, this.partOutline, this.timestamp}); + Outline({this.title, this.partOutline}); factory Outline.fromJson(Map json) => Outline( title: json['title'] as String?, partOutline: (json['part_outline'] as List?) ?.map((e) => PartOutline.fromJson(e as Map)) .toList(), - timestamp: json['timestamp'] as int?, ); } diff --git a/lib/models_new/video/video_ai_conclusion/part_subtitle.dart b/lib/models_new/video/video_ai_conclusion/part_subtitle.dart deleted file mode 100644 index 18e4f7f51..000000000 --- a/lib/models_new/video/video_ai_conclusion/part_subtitle.dart +++ /dev/null @@ -1,13 +0,0 @@ -class PartSubtitle { - int? startTimestamp; - int? endTimestamp; - String? content; - - PartSubtitle({this.startTimestamp, this.endTimestamp, this.content}); - - factory PartSubtitle.fromJson(Map json) => PartSubtitle( - startTimestamp: json['start_timestamp'] as int?, - endTimestamp: json['end_timestamp'] as int?, - content: json['content'] as String?, - ); -} diff --git a/lib/models_new/video/video_ai_conclusion/subtitle.dart b/lib/models_new/video/video_ai_conclusion/subtitle.dart deleted file mode 100644 index 24e5d37b8..000000000 --- a/lib/models_new/video/video_ai_conclusion/subtitle.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:PiliPlus/models_new/video/video_ai_conclusion/part_subtitle.dart'; - -class Subtitle { - String? title; - List? partSubtitle; - int? timestamp; - - Subtitle({this.title, this.partSubtitle, this.timestamp}); - - factory Subtitle.fromJson(Map json) => Subtitle( - title: json['title'] as String?, - partSubtitle: (json['part_subtitle'] as List?) - ?.map((e) => PartSubtitle.fromJson(e as Map)) - .toList(), - timestamp: json['timestamp'] as int?, - ); -} diff --git a/lib/models_new/video/video_detail/arc.dart b/lib/models_new/video/video_detail/arc.dart index f19931938..f945e6d4e 100644 --- a/lib/models_new/video/video_detail/arc.dart +++ b/lib/models_new/video/video_detail/arc.dart @@ -1,93 +1,42 @@ import 'package:PiliPlus/models/model_owner.dart'; import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; -import 'package:PiliPlus/models_new/video/video_detail/rights.dart'; import 'package:PiliPlus/models_new/video/video_detail/stat.dart'; class Arc { int? aid; - int? videos; - int? typeId; - String? typeName; - int? copyright; String? pic; String? title; int? pubdate; - int? ctime; - String? desc; - int? state; int? duration; - Rights? rights; Owner? author; VideoStat? stat; - String? dynam1c; Dimension? dimension; - bool? isChargeableSeason; - bool? isBlooper; - int? enableVt; - String? vtDisplay; - int? typeIdV2; - String? typeNameV2; - int? isLessonVideo; Arc({ this.aid, - this.videos, - this.typeId, - this.typeName, - this.copyright, this.pic, this.title, this.pubdate, - this.ctime, - this.desc, - this.state, this.duration, - this.rights, this.author, this.stat, - this.dynam1c, this.dimension, - this.isChargeableSeason, - this.isBlooper, - this.enableVt, - this.vtDisplay, - this.typeIdV2, - this.typeNameV2, - this.isLessonVideo, }); factory Arc.fromJson(Map json) => Arc( aid: json['aid'] as int?, - videos: json['videos'] as int?, - typeId: json['type_id'] as int?, - typeName: json['type_name'] as String?, - copyright: json['copyright'] as int?, pic: json['pic'] as String?, title: json['title'] as String?, pubdate: json['pubdate'] as int?, - ctime: json['ctime'] as int?, - desc: json['desc'] as String?, - state: json['state'] as int?, duration: json['duration'] as int?, - rights: json['rights'] == null - ? null - : Rights.fromJson(json['rights'] as Map), author: json['author'] == null ? null : Owner.fromJson(json['author'] as Map), stat: json['stat'] == null ? null : VideoStat.fromJson(json['stat'] as Map), - dynam1c: json['dynamic'] as String?, dimension: json['dimension'] == null ? null : Dimension.fromJson(json['dimension'] as Map), - isChargeableSeason: json['is_chargeable_season'] as bool?, - isBlooper: json['is_blooper'] as bool?, - enableVt: json['enable_vt'] as int?, - vtDisplay: json['vt_display'] as String?, - typeIdV2: json['type_id_v2'] as int?, - typeNameV2: json['type_name_v2'] as String?, - isLessonVideo: json['is_lesson_video'] as int?, ); } diff --git a/lib/models_new/video/video_detail/argue_info.dart b/lib/models_new/video/video_detail/argue_info.dart index 58faca860..ddbc85ef9 100644 --- a/lib/models_new/video/video_detail/argue_info.dart +++ b/lib/models_new/video/video_detail/argue_info.dart @@ -1,13 +1,9 @@ class ArgueInfo { String? argueMsg; - int? argueType; - String? argueLink; - ArgueInfo({this.argueMsg, this.argueType, this.argueLink}); + ArgueInfo({this.argueMsg}); factory ArgueInfo.fromJson(Map json) => ArgueInfo( argueMsg: json['argue_msg'] as String?, - argueType: json['argue_type'] as int?, - argueLink: json['argue_link'] as String?, ); } diff --git a/lib/models_new/video/video_detail/data.dart b/lib/models_new/video/video_detail/data.dart index 9f49712c2..b1e32ad66 100644 --- a/lib/models_new/video/video_detail/data.dart +++ b/lib/models_new/video/video_detail/data.dart @@ -6,19 +6,13 @@ import 'package:PiliPlus/models_new/video/video_detail/page.dart'; import 'package:PiliPlus/models_new/video/video_detail/rights.dart'; import 'package:PiliPlus/models_new/video/video_detail/staff.dart'; import 'package:PiliPlus/models_new/video/video_detail/stat.dart'; -import 'package:PiliPlus/models_new/video/video_detail/subtitle.dart'; import 'package:PiliPlus/models_new/video/video_detail/ugc_season.dart'; -import 'package:PiliPlus/models_new/video/video_detail/user_garb.dart'; import 'package:PiliPlus/utils/parse_string.dart'; class VideoDetailData { String? bvid; int? aid; int? videos; - int? tid; - int? tidV2; - String? tname; - String? tnameV2; int? copyright; String? pic; String? title; @@ -26,36 +20,17 @@ class VideoDetailData { int? ctime; String? desc; List? descV2; - int? state; int? duration; Rights? rights; Owner? owner; VideoStat? stat; ArgueInfo? argueInfo; - String? dynam1c; int? cid; Dimension? dimension; int? seasonId; - int? teenageMode; - bool? isChargeableSeason; - bool? isStory; bool? isUpowerExclusive; - bool? isUpowerPlay; - bool? isUpowerPreview; - int? enableVt; - String? vtDisplay; - bool? isUpowerExclusiveWithQa; - bool? noCache; List? pages; - Subtitle? subtitle; UgcSeason? ugcSeason; - bool? isSeasonDisplay; - UserGarb? userGarb; - String? likeIcon; - bool? needJumpBv; - bool? disableShowUpInfo; - int? isStoryPlay; - bool? isViewSelf; List? staff; String? redirectUrl; bool isPageReversed = false; @@ -64,10 +39,6 @@ class VideoDetailData { this.bvid, this.aid, this.videos, - this.tid, - this.tidV2, - this.tname, - this.tnameV2, this.copyright, this.pic, this.title, @@ -75,36 +46,17 @@ class VideoDetailData { this.ctime, this.desc, this.descV2, - this.state, this.duration, this.rights, this.owner, this.stat, this.argueInfo, - this.dynam1c, this.cid, this.dimension, this.seasonId, - this.teenageMode, - this.isChargeableSeason, - this.isStory, this.isUpowerExclusive, - this.isUpowerPlay, - this.isUpowerPreview, - this.enableVt, - this.vtDisplay, - this.isUpowerExclusiveWithQa, - this.noCache, this.pages, - this.subtitle, this.ugcSeason, - this.isSeasonDisplay, - this.userGarb, - this.likeIcon, - this.needJumpBv, - this.disableShowUpInfo, - this.isStoryPlay, - this.isViewSelf, this.staff, this.redirectUrl, }); @@ -114,10 +66,6 @@ class VideoDetailData { bvid: json['bvid'] as String?, aid: json['aid'] as int?, videos: json['videos'] as int?, - tid: json['tid'] as int?, - tidV2: json['tid_v2'] as int?, - tname: json['tname'] as String?, - tnameV2: json['tname_v2'] as String?, copyright: json['copyright'] as int?, pic: json['pic'] as String?, title: json['title'] as String?, @@ -127,7 +75,6 @@ class VideoDetailData { descV2: (json['desc_v2'] as List?) ?.map((e) => DescV2.fromJson(e as Map)) .toList(), - state: json['state'] as int?, duration: json['duration'] as int?, rights: json['rights'] == null ? null @@ -141,40 +88,18 @@ class VideoDetailData { argueInfo: json['argue_info'] == null ? null : ArgueInfo.fromJson(json['argue_info'] as Map), - dynam1c: json['dynamic'] as String?, cid: json['cid'] as int?, dimension: json['dimension'] == null ? null : Dimension.fromJson(json['dimension'] as Map), seasonId: json['season_id'] as int?, - teenageMode: json['teenage_mode'] as int?, - isChargeableSeason: json['is_chargeable_season'] as bool?, - isStory: json['is_story'] as bool?, isUpowerExclusive: json['is_upower_exclusive'] as bool?, - isUpowerPlay: json['is_upower_play'] as bool?, - isUpowerPreview: json['is_upower_preview'] as bool?, - enableVt: json['enable_vt'] as int?, - vtDisplay: json['vt_display'] as String?, - isUpowerExclusiveWithQa: json['is_upower_exclusive_with_qa'] as bool?, - noCache: json['no_cache'] as bool?, pages: (json['pages'] as List?) ?.map((e) => Part.fromJson(e as Map)) .toList(), - subtitle: json['subtitle'] == null - ? null - : Subtitle.fromJson(json['subtitle'] as Map), ugcSeason: json['ugc_season'] == null ? null : UgcSeason.fromJson(json['ugc_season'] as Map), - isSeasonDisplay: json['is_season_display'] as bool?, - userGarb: json['user_garb'] == null - ? null - : UserGarb.fromJson(json['user_garb'] as Map), - likeIcon: json['like_icon'] as String?, - needJumpBv: json['need_jump_bv'] as bool?, - disableShowUpInfo: json['disable_show_up_info'] as bool?, - isStoryPlay: json['is_story_play'] as int?, - isViewSelf: json['is_view_self'] as bool?, staff: (json["staff"] as List?) ?.map((item) => Staff.fromJson(item)) .toList(), diff --git a/lib/models_new/video/video_detail/rights.dart b/lib/models_new/video/video_detail/rights.dart index a35c3695a..8a9b84f05 100644 --- a/lib/models_new/video/video_detail/rights.dart +++ b/lib/models_new/video/video_detail/rights.dart @@ -1,62 +1,11 @@ class Rights { - int? bp; - int? elec; - int? download; - int? movie; - int? pay; - int? hd5; - int? noReprint; - int? autoplay; - int? ugcPay; - int? isCooperation; - int? ugcPayPreview; - int? noBackground; - int? cleanMode; int? isSteinGate; - int? is360; - int? noShare; - int? arcPay; - int? freeWatch; Rights({ - this.bp, - this.elec, - this.download, - this.movie, - this.pay, - this.hd5, - this.noReprint, - this.autoplay, - this.ugcPay, - this.isCooperation, - this.ugcPayPreview, - this.noBackground, - this.cleanMode, this.isSteinGate, - this.is360, - this.noShare, - this.arcPay, - this.freeWatch, }); factory Rights.fromJson(Map json) => Rights( - bp: json['bp'] as int?, - elec: json['elec'] as int?, - download: json['download'] as int?, - movie: json['movie'] as int?, - pay: json['pay'] as int?, - hd5: json['hd5'] as int?, - noReprint: json['no_reprint'] as int?, - autoplay: json['autoplay'] as int?, - ugcPay: json['ugc_pay'] as int?, - isCooperation: json['is_cooperation'] as int?, - ugcPayPreview: json['ugc_pay_preview'] as int?, - noBackground: json['no_background'] as int?, - cleanMode: json['clean_mode'] as int?, isSteinGate: json['is_stein_gate'] as int?, - is360: json['is_360'] as int?, - noShare: json['no_share'] as int?, - arcPay: json['arc_pay'] as int?, - freeWatch: json['free_watch'] as int?, ); } diff --git a/lib/models_new/video/video_detail/stat.dart b/lib/models_new/video/video_detail/stat.dart index 427f022b7..7b711a3d0 100644 --- a/lib/models_new/video/video_detail/stat.dart +++ b/lib/models_new/video/video_detail/stat.dart @@ -1,25 +1,13 @@ import 'package:PiliPlus/models_new/video/video_detail/stat_detail.dart'; class VideoStat extends StatDetail { - int? aid; - int? nowRank; - int? hisRank; - int? dislike; - String? evaluation; - VideoStat.fromJson(Map json) { - aid = json['aid'] as int?; view = json['view'] as int?; danmaku = json['danmaku'] as int?; reply = json['reply'] as int?; favorite = json['favorite'] as int? ?? 0; coin = json['coin'] as num? ?? 0; share = json['share'] as int?; - nowRank = json['now_rank'] as int?; - hisRank = json['his_rank'] as int?; like = json['like'] as int? ?? 0; - dislike = json['dislike'] as int?; - evaluation = json['evaluation'] as String?; - vt = json['vt'] as int?; } } diff --git a/lib/models_new/video/video_detail/stat_detail.dart b/lib/models_new/video/video_detail/stat_detail.dart index 5a82cc483..1e8000f39 100644 --- a/lib/models_new/video/video_detail/stat_detail.dart +++ b/lib/models_new/video/video_detail/stat_detail.dart @@ -6,5 +6,4 @@ abstract class StatDetail { int? reply; int? share; int? view; - int? vt; } diff --git a/lib/models_new/video/video_detail/subtitle.dart b/lib/models_new/video/video_detail/subtitle.dart deleted file mode 100644 index c50efaf4f..000000000 --- a/lib/models_new/video/video_detail/subtitle.dart +++ /dev/null @@ -1,11 +0,0 @@ -class Subtitle { - bool? allowSubmit; - List? list; - - Subtitle({this.allowSubmit, this.list}); - - factory Subtitle.fromJson(Map json) => Subtitle( - allowSubmit: json['allow_submit'] as bool?, - list: json['list'] as List?, - ); -} diff --git a/lib/models_new/video/video_detail/ugc_season.dart b/lib/models_new/video/video_detail/ugc_season.dart index 8b6ca27d0..084915432 100644 --- a/lib/models_new/video/video_detail/ugc_season.dart +++ b/lib/models_new/video/video_detail/ugc_season.dart @@ -1,35 +1,18 @@ import 'package:PiliPlus/models_new/video/video_detail/section.dart'; -import 'package:PiliPlus/models_new/video/video_detail/stat.dart'; class UgcSeason { int? id; String? title; String? cover; int? mid; - String? intro; - int? signState; - int? attribute; List? sections; - VideoStat? stat; - int? epCount; - int? seasonType; - bool? isPaySeason; - int? enableVt; UgcSeason({ this.id, this.title, this.cover, this.mid, - this.intro, - this.signState, - this.attribute, this.sections, - this.stat, - this.epCount, - this.seasonType, - this.isPaySeason, - this.enableVt, }); factory UgcSeason.fromJson(Map json) => UgcSeason( @@ -37,18 +20,8 @@ class UgcSeason { title: json['title'] as String?, cover: json['cover'] as String?, mid: json['mid'] as int?, - intro: json['intro'] as String?, - signState: json['sign_state'] as int?, - attribute: json['attribute'] as int?, sections: (json['sections'] as List?) ?.map((e) => SectionItem.fromJson(e as Map)) .toList(), - stat: json['stat'] == null - ? null - : VideoStat.fromJson(json['stat'] as Map), - epCount: json['ep_count'] as int?, - seasonType: json['season_type'] as int?, - isPaySeason: json['is_pay_season'] as bool?, - enableVt: json['enable_vt'] as int?, ); } diff --git a/lib/models_new/video/video_detail/user_garb.dart b/lib/models_new/video/video_detail/user_garb.dart deleted file mode 100644 index 0c86befb6..000000000 --- a/lib/models_new/video/video_detail/user_garb.dart +++ /dev/null @@ -1,9 +0,0 @@ -class UserGarb { - String? urlImageAniCut; - - UserGarb({this.urlImageAniCut}); - - factory UserGarb.fromJson(Map json) => UserGarb( - urlImageAniCut: json['url_image_ani_cut'] as String?, - ); -} diff --git a/lib/models_new/video/video_note_list/author.dart b/lib/models_new/video/video_note_list/author.dart index 22ce71edb..808b6f828 100644 --- a/lib/models_new/video/video_note_list/author.dart +++ b/lib/models_new/video/video_note_list/author.dart @@ -9,7 +9,6 @@ class Author { Vip? vipInfo; Pendant? pendant; BaseOfficialVerify? official; - int? follower; Author({ this.mid, @@ -20,7 +19,6 @@ class Author { this.vipInfo, this.pendant, this.official, - this.follower, }); factory Author.fromJson(Map json) => Author( @@ -38,6 +36,5 @@ class Author { official: json['official'] == null ? null : BaseOfficialVerify.fromJson(json['official'] as Map), - follower: json['follower'] as int?, ); } diff --git a/lib/models_new/video/video_note_list/data.dart b/lib/models_new/video/video_note_list/data.dart index 6c5527144..1b5af63a2 100644 --- a/lib/models_new/video/video_note_list/data.dart +++ b/lib/models_new/video/video_note_list/data.dart @@ -4,10 +4,8 @@ import 'package:PiliPlus/models_new/video/video_note_list/page.dart'; class VideoNoteData { List? list; Page? page; - bool? showPublicNote; - String? message; - VideoNoteData({this.list, this.page, this.showPublicNote, this.message}); + VideoNoteData({this.list, this.page}); factory VideoNoteData.fromJson(Map json) => VideoNoteData( list: (json['list'] as List?) @@ -16,7 +14,5 @@ class VideoNoteData { page: json['page'] == null ? null : Page.fromJson(json['page'] as Map), - showPublicNote: json['show_public_note'] as bool?, - message: json['message'] as String?, ); } diff --git a/lib/models_new/video/video_note_list/list.dart b/lib/models_new/video/video_note_list/list.dart index 8661c3607..1f54c34a2 100644 --- a/lib/models_new/video/video_note_list/list.dart +++ b/lib/models_new/video/video_note_list/list.dart @@ -2,39 +2,24 @@ import 'package:PiliPlus/models_new/video/video_note_list/author.dart'; class VideoNoteItemModel { int? cvid; - String? title; String? summary; String? pubtime; - String? webUrl; - String? message; Author? author; - int? likes; - bool? hasLike; VideoNoteItemModel({ this.cvid, - this.title, this.summary, this.pubtime, - this.webUrl, - this.message, this.author, - this.likes, - this.hasLike, }); factory VideoNoteItemModel.fromJson(Map json) => VideoNoteItemModel( cvid: json['cvid'] as int?, - title: json['title'] as String?, summary: json['summary'] as String?, pubtime: json['pubtime'] as String?, - webUrl: json['web_url'] as String?, - message: json['message'] as String?, author: json['author'] == null ? null : Author.fromJson(json['author'] as Map), - likes: json['likes'] as int?, - hasLike: json['has_like'] as bool?, ); } diff --git a/lib/models_new/video/video_note_list/page.dart b/lib/models_new/video/video_note_list/page.dart index 22984a071..748324093 100644 --- a/lib/models_new/video/video_note_list/page.dart +++ b/lib/models_new/video/video_note_list/page.dart @@ -1,13 +1,9 @@ class Page { int? total; - int? size; - int? num; - Page({this.total, this.size, this.num}); + Page({this.total}); factory Page.fromJson(Map json) => Page( total: json['total'] as int?, - size: json['size'] as int?, - num: json['num'] as int?, ); } diff --git a/lib/models_new/video/video_play_info/view_point.dart b/lib/models_new/video/video_play_info/view_point.dart index 41a69bb18..fe44ea79e 100644 --- a/lib/models_new/video/video_play_info/view_point.dart +++ b/lib/models_new/video/video_play_info/view_point.dart @@ -4,9 +4,6 @@ class ViewPoint { int? to; String? content; String? imgUrl; - String? logoUrl; - String? teamType; - String? teamName; ViewPoint({ this.type, @@ -14,9 +11,6 @@ class ViewPoint { this.to, this.content, this.imgUrl, - this.logoUrl, - this.teamType, - this.teamName, }); factory ViewPoint.fromJson(Map json) => ViewPoint( @@ -25,8 +19,5 @@ class ViewPoint { to: json["to"], content: json["content"], imgUrl: json["imgUrl"], - logoUrl: json["logoUrl"], - teamType: json["team_type"], - teamName: json["team_name"], ); } diff --git a/lib/models_new/video/video_stein_edgeinfo/choice.dart b/lib/models_new/video/video_stein_edgeinfo/choice.dart index 2101ee8a7..28a9f39ca 100644 --- a/lib/models_new/video/video_stein_edgeinfo/choice.dart +++ b/lib/models_new/video/video_stein_edgeinfo/choice.dart @@ -1,29 +1,17 @@ import 'package:PiliPlus/models_new/video/video_detail/episode.dart'; class Choice extends BaseEpisodeItem { - String? platformAction; - String? nativeAction; - String? condition; String? option; - int? isDefault; Choice({ super.id, - this.platformAction, - this.nativeAction, - this.condition, super.cid, this.option, - this.isDefault, }); factory Choice.fromJson(Map json) => Choice( id: json['id'] as int?, - platformAction: json['platform_action'] as String?, - nativeAction: json['native_action'] as String?, - condition: json['condition'] as String?, cid: json['cid'] as int?, option: json['option'] as String?, - isDefault: json['is_default'] as int?, ); } diff --git a/lib/models_new/video/video_stein_edgeinfo/data.dart b/lib/models_new/video/video_stein_edgeinfo/data.dart index 1b3ed20e4..4db19de6f 100644 --- a/lib/models_new/video/video_stein_edgeinfo/data.dart +++ b/lib/models_new/video/video_stein_edgeinfo/data.dart @@ -1,39 +1,15 @@ import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/edges.dart'; -import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/preload.dart'; -import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/story_list.dart'; class EdgeInfoData { - String? title; - int? edgeId; - List? storyList; Edges? edges; - String? buvid; - Preload? preload; - int? isLeaf; EdgeInfoData({ - this.title, - this.edgeId, - this.storyList, this.edges, - this.buvid, - this.preload, - this.isLeaf, }); factory EdgeInfoData.fromJson(Map json) => EdgeInfoData( - title: json['title'] as String?, - edgeId: json['edge_id'] as int?, - storyList: (json['story_list'] as List?) - ?.map((e) => StoryList.fromJson(e as Map)) - .toList(), edges: json['edges'] == null ? null : Edges.fromJson(json['edges'] as Map), - buvid: json['buvid'] as String?, - preload: json['preload'] == null - ? null - : Preload.fromJson(json['preload'] as Map), - isLeaf: json['is_leaf'] as int?, ); } diff --git a/lib/models_new/video/video_stein_edgeinfo/edges.dart b/lib/models_new/video/video_stein_edgeinfo/edges.dart index 4d7a93424..a31946e10 100644 --- a/lib/models_new/video/video_stein_edgeinfo/edges.dart +++ b/lib/models_new/video/video_stein_edgeinfo/edges.dart @@ -1,23 +1,13 @@ -import 'package:PiliPlus/models_new/video/video_detail/dimension.dart'; import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/question.dart'; -import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/skin.dart'; class Edges { - Dimension? dimension; List? questions; - Skin? skin; - Edges({this.dimension, this.questions, this.skin}); + Edges({this.questions}); factory Edges.fromJson(Map json) => Edges( - dimension: json['dimension'] == null - ? null - : Dimension.fromJson(json['dimension'] as Map), questions: (json['questions'] as List?) ?.map((e) => Question.fromJson(e as Map)) .toList(), - skin: json['skin'] == null - ? null - : Skin.fromJson(json['skin'] as Map), ); } diff --git a/lib/models_new/video/video_stein_edgeinfo/preload.dart b/lib/models_new/video/video_stein_edgeinfo/preload.dart deleted file mode 100644 index c3ab32c2a..000000000 --- a/lib/models_new/video/video_stein_edgeinfo/preload.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/video.dart'; - -class Preload { - List