Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-16 14:22:47 +08:00
parent 13818533a7
commit 0baf3fcd36
283 changed files with 803 additions and 1550 deletions

View File

@@ -1,6 +1,6 @@
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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class ArticleInfoData {
int? like;

View File

@@ -1,6 +1,6 @@
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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class ArticleListItemModel {
int? id;

View File

@@ -1,5 +1,5 @@
import 'package:PiliPlus/models_new/article/article_list/category.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class Last {
int? id;

View File

@@ -5,7 +5,7 @@ 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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class ArticleViewData {
int? id;

View File

@@ -1,4 +1,4 @@
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
sealed class BiliDownloadMediaInfo {
const BiliDownloadMediaInfo();

View File

@@ -12,7 +12,7 @@ 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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class FavPgcItemModel with MultiSelectData {
int? seasonId;

View File

@@ -1,4 +1,4 @@
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class Section {
int? sectionId;

View File

@@ -6,7 +6,6 @@ class History {
int? cid;
String? part;
String? business;
int? dt;
History({
this.oid,
@@ -16,7 +15,6 @@ class History {
this.cid,
this.part,
this.business,
this.dt,
});
factory History.fromJson(Map<String, dynamic> json) => History(
@@ -27,6 +25,5 @@ class History {
cid: json['cid'] == 0 ? null : json['cid'],
part: json['part'],
business: json['business'],
dt: json['dt'],
);
}

View File

@@ -1,6 +1,6 @@
import 'package:PiliPlus/models_new/history/history.dart';
import 'package:PiliPlus/pages/common/multi_select/base.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class HistoryItemModel with MultiSelectData {
String? title;

View File

@@ -4,8 +4,6 @@ class Bangumi {
int? epId;
String? title;
String? longTitle;
int? episodeStatus;
int? follow;
String? cover;
Season? season;
@@ -13,8 +11,6 @@ class Bangumi {
this.epId,
this.title,
this.longTitle,
this.episodeStatus,
this.follow,
this.cover,
this.season,
});
@@ -23,8 +19,6 @@ class Bangumi {
epId: json['ep_id'] as int?,
title: json['title'] as String?,
longTitle: json['long_title'] as String?,
episodeStatus: json['episode_status'] as int?,
follow: json['follow'] as int?,
cover: json['cover'] as String?,
season: json['season'] == null
? null

View File

@@ -1,13 +0,0 @@
class Dimension {
int? width;
int? height;
int? rotate;
Dimension({this.width, this.height, this.rotate});
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json['width'] as int?,
height: json['height'] as int?,
rotate: json['rotate'] as int?,
);
}

View File

@@ -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/dimension.dart';
import 'package:PiliPlus/models_new/later/owner.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';
@@ -9,94 +8,46 @@ import 'package:PiliPlus/pages/common/multi_select/base.dart';
class LaterItemModel with MultiSelectData {
int? aid;
int? videos;
int? tid;
String? tname;
int? copyright;
String? pic;
String? title;
String? subtitle;
int? pubdate;
int? ctime;
String? desc;
int? state;
int? duration;
String? redirectUrl;
Rights? rights;
Owner? owner;
Stat? stat;
String? dynam1c;
Dimension? dimension;
String? shortLinkV2;
int? upFromV2;
String? pubLocation;
String? cover43;
int? tidv2;
String? tnamev2;
int? pidV2;
String? pidNameV2;
List<Page>? pages;
Bangumi? bangumi;
int? cid;
int? progress;
int? addAt;
String? bvid;
String? uri;
bool? viewed;
int? seq;
int? enableVt;
String? viewText1;
bool? isPgc;
String? pgcLabel;
bool? isPugv;
int? missionId;
String? firstFrame;
int? seasonId;
bool? isCharging;
LaterItemModel({
this.aid,
this.videos,
this.tid,
this.tname,
this.copyright,
this.pic,
this.title,
this.subtitle,
this.pubdate,
this.ctime,
this.desc,
this.state,
this.duration,
this.redirectUrl,
this.rights,
this.owner,
this.stat,
this.dynam1c,
this.dimension,
this.shortLinkV2,
this.upFromV2,
this.pubLocation,
this.cover43,
this.tidv2,
this.tnamev2,
this.pidV2,
this.pidNameV2,
this.pages,
this.bangumi,
this.cid,
this.progress,
this.addAt,
this.bvid,
this.uri,
this.viewed,
this.seq,
this.enableVt,
this.viewText1,
this.isPgc,
this.pgcLabel,
this.isPugv,
this.missionId,
this.firstFrame,
this.seasonId,
this.isCharging,
});
@@ -104,15 +55,9 @@ class LaterItemModel with MultiSelectData {
factory LaterItemModel.fromJson(Map<String, dynamic> json) => LaterItemModel(
aid: json['aid'] as int?,
videos: json['videos'] as int?,
tid: json['tid'] as int?,
tname: json['tname'] 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?,
redirectUrl: json['redirect_url'] as String?,
rights: json['rights'] == null
@@ -124,18 +69,6 @@ class LaterItemModel with MultiSelectData {
stat: json['stat'] == null
? null
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
dynam1c: json['dynamic'] as String?,
dimension: json['dimension'] == null
? null
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
shortLinkV2: json['short_link_v2'] as String?,
upFromV2: json['up_from_v2'] as int?,
pubLocation: json['pub_location'] as String?,
cover43: json['cover43'] as String?,
tidv2: json['tidv2'] as int?,
tnamev2: json['tnamev2'] as String?,
pidV2: json['pid_v2'] as int?,
pidNameV2: json['pid_name_v2'] as String?,
pages: (json['pages'] as List<dynamic>?)
?.map((e) => Page.fromJson(e as Map<String, dynamic>))
.toList(),
@@ -150,18 +83,10 @@ class LaterItemModel with MultiSelectData {
),
cid: json['cid'] as int?,
progress: json['progress'] as int?,
addAt: json['add_at'] as int?,
bvid: json['bvid'] as String?,
uri: json['uri'] as String?,
viewed: json['viewed'] as bool?,
seq: json['seq'] as int?,
enableVt: json['enable_vt'] as int?,
viewText1: json['view_text_1'] as String?,
isPgc: json['is_pgc'] as bool?,
pgcLabel: json['pgc_label'] == '' ? null : json['pgc_label'],
isPugv: json['is_pugv'] as bool?,
missionId: json['mission_id'] as int?,
firstFrame: json['first_frame'] as String?,
seasonId: json['season_id'] as int?,
isCharging: json['charging_pay']?['level'] != null,
);

View File

@@ -1,13 +0,0 @@
class Owner {
int? mid;
String? name;
String? face;
Owner({this.mid, this.name, this.face});
factory Owner.fromJson(Map<String, dynamic> json) => Owner(
mid: json['mid'] as int?,
name: json['name'] as String?,
face: json['face'] as String?,
);
}

View File

@@ -1,39 +1,17 @@
import 'package:PiliPlus/models_new/later/dimension.dart';
class Page {
int? cid;
int? page;
String? from;
String? part;
int? duration;
String? vid;
String? weblink;
Dimension? dimension;
int? ctime;
Page({
this.cid,
this.page,
this.from,
this.part,
this.duration,
this.vid,
this.weblink,
this.dimension,
this.ctime,
});
factory Page.fromJson(Map<String, dynamic> json) => Page(
cid: json['cid'] as int?,
page: json['page'] as int?,
from: json['from'] as String?,
part: json['part'] as String?,
duration: json['duration'] as int?,
vid: json['vid'] as String?,
weblink: json['weblink'] as String?,
dimension: json['dimension'] == null
? null
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
ctime: json['ctime'] as int?,
);
}

View File

@@ -1,50 +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? arcPay;
int? payFreeWatch;
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.arcPay,
this.payFreeWatch,
});
factory Rights.fromJson(Map<String, dynamic> 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?,
arcPay: json['arc_pay'] as int?,
payFreeWatch: json['pay_free_watch'] as int?,
);
}

View File

@@ -1,32 +1,14 @@
class Season {
int? seasonId;
String? title;
int? seasonStatus;
int? isFinish;
int? totalCount;
int? newestEpId;
String? newestEpIndex;
int? seasonType;
Season({
this.seasonId,
this.title,
this.seasonStatus,
this.isFinish,
this.totalCount,
this.newestEpId,
this.newestEpIndex,
this.seasonType,
});
factory Season.fromJson(Map<String, dynamic> json) => Season(
seasonId: json['season_id'] as int?,
title: json['title'] as String?,
seasonStatus: json['season_status'] as int?,
isFinish: json['is_finish'] as int?,
totalCount: json['total_count'] as int?,
newestEpId: json['newest_ep_id'] as int?,
newestEpIndex: json['newest_ep_index'] as String?,
seasonType: json['season_type'] as int?,
);
}

View File

@@ -2,46 +2,16 @@ class Stat {
int? aid;
int? view;
int? danmaku;
int? reply;
int? favorite;
num? coin;
int? share;
int? nowRank;
int? hisRank;
int? like;
int? dislike;
int? vt;
int? vv;
Stat({
this.aid,
this.view,
this.danmaku,
this.reply,
this.favorite,
this.coin,
this.share,
this.nowRank,
this.hisRank,
this.like,
this.dislike,
this.vt,
this.vv,
});
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
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?,
coin: json['coin'] as num?,
share: json['share'] as int?,
nowRank: json['now_rank'] as int?,
hisRank: json['his_rank'] as int?,
like: json['like'] as int?,
dislike: json['dislike'] as int?,
vt: json['vt'] as int?,
vv: json['vv'] as int?,
);
}

View File

@@ -1,33 +1,24 @@
class AreaItem {
dynamic id;
String? name;
String? link;
String? pic;
dynamic parentId;
String? parentName;
int? areaType;
int? tagType;
AreaItem({
this.id,
this.name,
this.link,
this.pic,
this.parentId,
this.parentName,
this.areaType,
this.tagType,
});
factory AreaItem.fromJson(Map<String, dynamic> json) => AreaItem(
id: json['id'],
name: json['name'] as String?,
link: json['link'] as String?,
pic: json['pic'] as String?,
parentId: json['parent_id'],
parentName: json['parent_name'] as String?,
areaType: json['area_type'] as int?,
tagType: json['tag_type'] as int?,
);
@override

View File

@@ -1,20 +1,16 @@
import 'package:PiliPlus/models_new/live/live_dm_block/shield_rules.dart';
import 'package:PiliPlus/models_new/live/live_dm_block/shield_user_list.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class ShieldInfo {
List<ShieldUserList>? shieldUserList;
List<String>? keywordList;
ShieldRules? shieldRules;
bool? isBlock;
int? blockExpired;
ShieldInfo({
this.shieldUserList,
this.keywordList,
this.shieldRules,
this.isBlock,
this.blockExpired,
});
factory ShieldInfo.fromJson(Map<String, dynamic> json) => ShieldInfo(
@@ -25,7 +21,5 @@ class ShieldInfo {
shieldRules: json['shield_rules'] == null
? null
: ShieldRules.fromJson(json['shield_rules'] as Map<String, dynamic>),
isBlock: json['is_block'] as bool?,
blockExpired: json['block_expired'] as int?,
);
}

View File

@@ -1,30 +1,15 @@
import 'package:PiliPlus/models_new/live/live_dm_info/host_list.dart';
class LiveDmInfoData {
String? group;
int? businessId;
double? refreshRowFactor;
int? refreshRate;
int? maxDelay;
String? token;
List<HostList>? hostList;
LiveDmInfoData({
this.group,
this.businessId,
this.refreshRowFactor,
this.refreshRate,
this.maxDelay,
this.token,
this.hostList,
});
factory LiveDmInfoData.fromJson(Map<String, dynamic> json) => LiveDmInfoData(
group: json['group'] as String?,
businessId: json['business_id'] as int?,
refreshRowFactor: (json['refresh_row_factor'] as num?)?.toDouble(),
refreshRate: json['refresh_rate'] as int?,
maxDelay: json['max_delay'] as int?,
token: json['token'] as String?,
hostList: (json['host_list'] as List<dynamic>?)
?.map((e) => HostList.fromJson(e as Map<String, dynamic>))

View File

@@ -1,23 +1,17 @@
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
import 'package:PiliPlus/models_new/live/live_feed_index/module_info.dart';
class CardDataItem {
ModuleInfo? moduleInfo;
List<CardLiveItem>? list;
dynamic topView;
ExtraInfo? extraInfo;
CardDataItem({
this.moduleInfo,
this.list,
this.topView,
this.extraInfo,
});
factory CardDataItem.fromJson(Map<String, dynamic> json) => CardDataItem(
moduleInfo: json['module_info'] == null
? null
: ModuleInfo.fromJson(json['module_info'] as Map<String, dynamic>),
list: (json['list'] as List<dynamic>?)
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
.toList(),

View File

@@ -7,21 +7,13 @@ class CardLiveItem {
String? face;
String? cover;
String? title;
int? area;
int? liveTime;
String? areaName;
int? areaV2Id;
String? areaV2Name;
String? areaV2ParentName;
int? areaV2ParentId;
String? liveTagName;
int? online;
String? link;
int? officialVerify;
int? currentQn;
WatchedShow? watchedShow;
String? statusText;
int? tagType;
CardLiveItem({
this.roomid,
@@ -30,21 +22,13 @@ class CardLiveItem {
this.face,
this.cover,
this.title,
this.area,
this.liveTime,
this.areaName,
this.areaV2Id,
this.areaV2Name,
this.areaV2ParentName,
this.areaV2ParentId,
this.liveTagName,
this.online,
this.link,
this.officialVerify,
this.currentQn,
this.watchedShow,
this.statusText,
this.tagType,
});
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
@@ -54,22 +38,14 @@ class CardLiveItem {
face: json['face'] as String?,
cover: json['cover'] as String?,
title: json['title'] as String?,
area: json['area'] as int?,
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?,
liveTagName: json['live_tag_name'] as String?,
online: json['online'] as int?,
link: json['link'] as String?,
officialVerify: json['official_verify'] as int?,
currentQn: json['current_qn'] as int?,
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(json['watched_show'] as Map<String, dynamic>),
statusText: json['status_text'] as String?,
tagType: json['tag_type'],
);
}

View File

@@ -2,19 +2,13 @@ import 'package:PiliPlus/models_new/live/live_feed_index/card_list.dart';
class LiveIndexData {
List<LiveCardList>? cardList;
int? isRollback;
int? hasMore;
int? triggerTime;
int? isNeedRefresh;
LiveCardList? followItem;
LiveCardList? areaItem;
LiveIndexData({
this.cardList,
this.isRollback,
this.hasMore,
this.triggerTime,
this.isNeedRefresh,
});
LiveIndexData.fromJson(Map<String, dynamic> json) {
@@ -38,9 +32,6 @@ class LiveIndexData {
}
}
}
isRollback = json['is_rollback'] as int?;
hasMore = json['has_more'] as int?;
triggerTime = json['trigger_time'] as int?;
isNeedRefresh = json['is_need_refresh'] as int?;
}
}

View File

@@ -1,19 +0,0 @@
import 'package:PiliPlus/models_new/live/live_feed_index/data.dart';
class LiveFeedIndex {
int? code;
String? message;
int? ttl;
LiveIndexData? data;
LiveFeedIndex({this.code, this.message, this.ttl, this.data});
factory LiveFeedIndex.fromJson(Map<String, dynamic> json) => LiveFeedIndex(
code: json['code'] as int?,
message: json['message'] as String?,
ttl: json['ttl'] as int?,
data: json['data'] == null
? null
: LiveIndexData.fromJson(json['data'] as Map<String, dynamic>),
);
}

View File

@@ -1,29 +0,0 @@
class ModuleInfo {
int? id;
String? link;
String? pic;
String? title;
int? type;
int? sort;
int? count;
ModuleInfo({
this.id,
this.link,
this.pic,
this.title,
this.type,
this.sort,
this.count,
});
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
id: json['id'] as int?,
link: json['link'] as String?,
pic: json['pic'] as String?,
title: json['title'] as String?,
type: json['type'] as int?,
sort: json['sort'] as int?,
count: json['count'] as int?,
);
}

View File

@@ -6,9 +6,7 @@ class LiveFollowData {
int? totalPage;
List<LiveFollowItem>? list;
int? count;
int? neverLivedCount;
int? liveCount;
List<dynamic>? neverLivedFaces;
LiveFollowData({
this.title,
@@ -16,9 +14,7 @@ class LiveFollowData {
this.totalPage,
this.list,
this.count,
this.neverLivedCount,
this.liveCount,
this.neverLivedFaces,
});
LiveFollowData.fromJson(Map<String, dynamic> json) {
@@ -34,8 +30,6 @@ class LiveFollowData {
}
}
count = json['count'] as int?;
neverLivedCount = json['never_lived_count'] as int?;
liveCount = json['live_count'] as int?;
neverLivedFaces = json['never_lived_faces'] as List<dynamic>?;
}
}

View File

@@ -5,25 +5,10 @@ class LiveFollowItem {
String? title;
String? face;
int? liveStatus;
int? recordNum;
String? recentRecordId;
int? isAttention;
int? clipnum;
int? fansNum;
String? areaName;
String? areaValue;
String? tags;
String? recentRecordIdV2;
int? recordNumV2;
int? recordLiveTime;
String? areaNameV2;
String? roomNews;
bool? sw1tch;
String? watchIcon;
String? textSmall;
String? roomCover;
int? parentAreaId;
int? areaId;
LiveFollowItem({
this.roomid,
@@ -32,25 +17,10 @@ class LiveFollowItem {
this.title,
this.face,
this.liveStatus,
this.recordNum,
this.recentRecordId,
this.isAttention,
this.clipnum,
this.fansNum,
this.areaName,
this.areaValue,
this.tags,
this.recentRecordIdV2,
this.recordNumV2,
this.recordLiveTime,
this.areaNameV2,
this.roomNews,
this.sw1tch,
this.watchIcon,
this.textSmall,
this.roomCover,
this.parentAreaId,
this.areaId,
});
factory LiveFollowItem.fromJson(Map<String, dynamic> json) => LiveFollowItem(
@@ -60,24 +30,9 @@ class LiveFollowItem {
title: json['title'] as String?,
face: json['face'] as String?,
liveStatus: json['live_status'] as int?,
recordNum: json['record_num'] as int?,
recentRecordId: json['recent_record_id'] as String?,
isAttention: json['is_attention'] as int?,
clipnum: json['clipnum'] as int?,
fansNum: json['fans_num'] as int?,
areaName: json['area_name'] as String?,
areaValue: json['area_value'] as String?,
tags: json['tags'] as String?,
recentRecordIdV2: json['recent_record_id_v2'] as String?,
recordNumV2: json['record_num_v2'] as int?,
recordLiveTime: json['record_live_time'] as int?,
areaNameV2: json['area_name_v2'] as String?,
roomNews: json['room_news'] as String?,
sw1tch: json['switch'] as bool?,
watchIcon: json['watch_icon'] as String?,
textSmall: json['text_small'] as String?,
roomCover: json['room_cover'] as String?,
parentAreaId: json['parent_area_id'] as int?,
areaId: json['area_id'] as int?,
);
}

View File

@@ -1,18 +1,13 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/base_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/relation_info.dart';
class AnchorInfo {
BaseInfo? baseInfo;
RelationInfo? relationInfo;
AnchorInfo({this.baseInfo, this.relationInfo});
AnchorInfo({this.baseInfo});
factory AnchorInfo.fromJson(Map<String, dynamic> json) => AnchorInfo(
baseInfo: json['base_info'] == null
? null
: BaseInfo.fromJson(json['base_info'] as Map<String, dynamic>),
relationInfo: json['relation_info'] == null
? null
: RelationInfo.fromJson(json['relation_info'] as Map<String, dynamic>),
);
}

View File

@@ -1,13 +0,0 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_masks.dart';
class AreaMaskInfo {
AreaMasks? areaMasks;
AreaMaskInfo({this.areaMasks});
factory AreaMaskInfo.fromJson(Map<String, dynamic> json) => AreaMaskInfo(
areaMasks: json['area_masks'] == null
? null
: AreaMasks.fromJson(json['area_masks'] as Map<String, dynamic>),
);
}

View File

@@ -1,13 +0,0 @@
class AreaMasks {
dynamic horizontalMasks;
dynamic verticalMasks;
dynamic fullMask;
AreaMasks({this.horizontalMasks, this.verticalMasks, this.fullMask});
factory AreaMasks.fromJson(Map<String, dynamic> json) => AreaMasks(
horizontalMasks: json['horizontal_masks'] as dynamic,
verticalMasks: json['vertical_masks'] as dynamic,
fullMask: json['full_mask'] as dynamic,
);
}

View File

@@ -1,17 +1,11 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/official_info.dart';
class BaseInfo {
String? uname;
String? face;
OfficialInfo? officialInfo;
BaseInfo({this.uname, this.face, this.officialInfo});
BaseInfo({this.uname, this.face});
factory BaseInfo.fromJson(Map<String, dynamic> json) => BaseInfo(
uname: json['uname'] as String?,
face: json['face'] as String?,
officialInfo: json['official_info'] == null
? null
: OfficialInfo.fromJson(json['official_info'] as Map<String, dynamic>),
);
}

View File

@@ -1,13 +0,0 @@
class BlockInfo {
bool? block;
String? desc;
int? business;
BlockInfo({this.block, this.desc, this.business});
factory BlockInfo.fromJson(Map<String, dynamic> json) => BlockInfo(
block: json['block'] as bool?,
desc: json['desc'] as String?,
business: json['business'] as int?,
);
}

View File

@@ -1,38 +1,16 @@
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/anchor_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_mask_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/block_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/like_info_v3.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/new_switch_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/news_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/room_info.dart';
class RoomInfoH5Data {
RoomInfo? roomInfo;
AnchorInfo? anchorInfo;
NewSwitchInfo? newSwitchInfo;
List<dynamic>? bannerInfo;
int? isRoomFeed;
List<dynamic>? tabInfo;
NewsInfo? newsInfo;
WatchedShow? watchedShow;
LikeInfoV3? likeInfoV3;
BlockInfo? blockInfo;
AreaMaskInfo? areaMaskInfo;
RoomInfoH5Data({
this.roomInfo,
this.anchorInfo,
this.newSwitchInfo,
this.bannerInfo,
this.isRoomFeed,
this.tabInfo,
this.newsInfo,
this.watchedShow,
this.likeInfoV3,
this.blockInfo,
this.areaMaskInfo,
});
factory RoomInfoH5Data.fromJson(Map<String, dynamic> json) => RoomInfoH5Data(
@@ -42,28 +20,8 @@ class RoomInfoH5Data {
anchorInfo: json['anchor_info'] == null
? null
: AnchorInfo.fromJson(json['anchor_info'] as Map<String, dynamic>),
newSwitchInfo: json['new_switch_info'] == null
? null
: NewSwitchInfo.fromJson(
json['new_switch_info'] as Map<String, dynamic>,
),
bannerInfo: json['banner_info'] as List<dynamic>?,
isRoomFeed: json['is_room_feed'] as int?,
tabInfo: json['tab_info'] as List<dynamic>?,
newsInfo: json['news_info'] == null
? null
: NewsInfo.fromJson(json['news_info'] as Map<String, dynamic>),
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(json['watched_show'] as Map<String, dynamic>),
likeInfoV3: json['like_info_v3'] == null
? null
: LikeInfoV3.fromJson(json['like_info_v3'] as Map<String, dynamic>),
blockInfo: json['block_info'] == null
? null
: BlockInfo.fromJson(json['block_info'] as Map<String, dynamic>),
areaMaskInfo: json['area_mask_info'] == null
? null
: AreaMaskInfo.fromJson(json['area_mask_info'] as Map<String, dynamic>),
);
}

View File

@@ -1,13 +0,0 @@
class Frame {
String? name;
String? value;
String? desc;
Frame({this.name, this.value, this.desc});
factory Frame.fromJson(Map<String, dynamic> json) => Frame(
name: json['name'] as String?,
value: json['value'] as String?,
desc: json['desc'] as String?,
);
}

View File

@@ -1,70 +0,0 @@
import 'package:PiliPlus/utils/extension.dart';
class LikeInfoV3 {
int? totalLikes;
bool? clickBlock;
bool? countBlock;
String? guildEmoText;
String? guildDmText;
String? likeDmText;
List<String>? handIcons;
List<String>? dmIcons;
String? eggshellsIcon;
int? countShowTime;
String? processIcon;
String? processColor;
int? reportClickLimit;
int? reportTimeMin;
int? reportTimeMax;
String? icon;
double? cooldown;
bool? handUseFace;
List<String>? guideIconUrls;
double? guideIconRatio;
LikeInfoV3({
this.totalLikes,
this.clickBlock,
this.countBlock,
this.guildEmoText,
this.guildDmText,
this.likeDmText,
this.handIcons,
this.dmIcons,
this.eggshellsIcon,
this.countShowTime,
this.processIcon,
this.processColor,
this.reportClickLimit,
this.reportTimeMin,
this.reportTimeMax,
this.icon,
this.cooldown,
this.handUseFace,
this.guideIconUrls,
this.guideIconRatio,
});
factory LikeInfoV3.fromJson(Map<String, dynamic> json) => LikeInfoV3(
totalLikes: json['total_likes'] as int?,
clickBlock: json['click_block'] as bool?,
countBlock: json['count_block'] as bool?,
guildEmoText: json['guild_emo_text'] as String?,
guildDmText: json['guild_dm_text'] as String?,
likeDmText: json['like_dm_text'] as String?,
handIcons: (json['hand_icons'] as List?)?.fromCast(),
dmIcons: (json['dm_icons'] as List?)?.fromCast(),
eggshellsIcon: json['eggshells_icon'] as String?,
countShowTime: json['count_show_time'] as int?,
processIcon: json['process_icon'] as String?,
processColor: json['process_color'] as String?,
reportClickLimit: json['report_click_limit'] as int?,
reportTimeMin: json['report_time_min'] as int?,
reportTimeMax: json['report_time_max'] as int?,
icon: json['icon'] as String?,
cooldown: (json['cooldown'] as num?)?.toDouble(),
handUseFace: json['hand_use_face'] as bool?,
guideIconUrls: (json['guide_icon_urls'] as List?)?.fromCast(),
guideIconRatio: (json['guide_icon_ratio'] as num?)?.toDouble(),
);
}

View File

@@ -1,26 +0,0 @@
class NewSwitchInfo {
int? roomInfoPopularity;
int? roomTab;
int? roomPlayerWatermark;
int? roomRecommendLiveOff;
int? brandUserCardSwitch;
int? brandFollowSwitch;
NewSwitchInfo({
this.roomInfoPopularity,
this.roomTab,
this.roomPlayerWatermark,
this.roomRecommendLiveOff,
this.brandUserCardSwitch,
this.brandFollowSwitch,
});
factory NewSwitchInfo.fromJson(Map<String, dynamic> json) => NewSwitchInfo(
roomInfoPopularity: json['room-info-popularity'] as int?,
roomTab: json['room-tab'] as int?,
roomPlayerWatermark: json['room-player-watermark'] as int?,
roomRecommendLiveOff: json['room-recommend-live_off'] as int?,
brandUserCardSwitch: json['brand-user-card-switch'] as int?,
brandFollowSwitch: json['brand-follow-switch'] as int?,
);
}

View File

@@ -1,13 +0,0 @@
class NewsInfo {
int? uid;
String? ctime;
String? content;
NewsInfo({this.uid, this.ctime, this.content});
factory NewsInfo.fromJson(Map<String, dynamic> json) => NewsInfo(
uid: json['uid'] as int?,
ctime: json['ctime'] as String?,
content: json['content'] as String?,
);
}

View File

@@ -1,23 +0,0 @@
class OfficialInfo {
int? role;
String? title;
String? desc;
int? isNft;
String? nftDmark;
OfficialInfo({
this.role,
this.title,
this.desc,
this.isNft,
this.nftDmark,
});
factory OfficialInfo.fromJson(Map<String, dynamic> json) => OfficialInfo(
role: json['role'] as int?,
title: json['title'] as String?,
desc: json['desc'] as String?,
isNft: json['is_nft'] as int?,
nftDmark: json['nft_dmark'] as String?,
);
}

View File

@@ -1,13 +0,0 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/frame.dart';
class Pendants {
Frame? frame;
Pendants({this.frame});
factory Pendants.fromJson(Map<String, dynamic> json) => Pendants(
frame: json['frame'] == null
? null
: Frame.fromJson(json['frame'] as Map<String, dynamic>),
);
}

View File

@@ -1,9 +0,0 @@
class RelationInfo {
int? attention;
RelationInfo({this.attention});
factory RelationInfo.fromJson(Map<String, dynamic> json) => RelationInfo(
attention: json['attention'] as int?,
);
}

View File

@@ -1,44 +1,24 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/pendants.dart';
class RoomInfo {
int? uid;
int? roomId;
String? title;
String? cover;
String? description;
int? liveStatus;
int? liveStartTime;
int? areaId;
String? areaName;
int? parentAreaId;
String? parentAreaName;
int? online;
String? keyframe;
String? background;
String? appBackground;
Pendants? pendants;
String? subSessionKey;
String? liveId;
RoomInfo({
this.uid,
this.roomId,
this.title,
this.cover,
this.description,
this.liveStatus,
this.liveStartTime,
this.areaId,
this.areaName,
this.parentAreaId,
this.parentAreaName,
this.online,
this.keyframe,
this.background,
this.appBackground,
this.pendants,
this.subSessionKey,
this.liveId,
});
factory RoomInfo.fromJson(Map<String, dynamic> json) => RoomInfo(
@@ -46,21 +26,10 @@ class RoomInfo {
roomId: json['room_id'] as int?,
title: json['title'] as String?,
cover: json['cover'] as String?,
description: json['description'] as String?,
liveStatus: json['live_status'] as int?,
liveStartTime: json['live_start_time'] as int?,
areaId: json['area_id'] as int?,
areaName: json['area_name'] as String?,
parentAreaId: json['parent_area_id'] as int?,
parentAreaName: json['parent_area_name'] as String?,
online: json['online'] as int?,
keyframe: json['keyframe'] as String?,
background: json['background'] as String?,
appBackground: json['app_background'] as String?,
pendants: json['pendants'] == null
? null
: Pendants.fromJson(json['pendants'] as Map<String, dynamic>),
subSessionKey: json['sub_session_key'] as String?,
liveId: json['live_id'] as String?,
);
}

View File

@@ -1,5 +1,5 @@
import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class CodecItem {
String? codecName;

View File

@@ -4,47 +4,19 @@ class RoomPlayInfoData {
int? roomId;
int? shortId;
int? uid;
bool? isHidden;
bool? isLocked;
bool? isPortrait;
int? liveStatus;
int? hiddenTill;
int? lockTill;
bool? encrypted;
bool? pwdVerified;
int? liveTime;
int? roomShield;
List<dynamic>? allSpecialTypes;
PlayurlInfo? playurlInfo;
int? officialType;
int? officialRoomId;
int? riskWithDelay;
String? multiScreenInfo;
dynamic pureControlFunction;
dynamic degradedPlayurl;
RoomPlayInfoData({
this.roomId,
this.shortId,
this.uid,
this.isHidden,
this.isLocked,
this.isPortrait,
this.liveStatus,
this.hiddenTill,
this.lockTill,
this.encrypted,
this.pwdVerified,
this.liveTime,
this.roomShield,
this.allSpecialTypes,
this.playurlInfo,
this.officialType,
this.officialRoomId,
this.riskWithDelay,
this.multiScreenInfo,
this.pureControlFunction,
this.degradedPlayurl,
});
factory RoomPlayInfoData.fromJson(Map<String, dynamic> json) =>
@@ -52,27 +24,13 @@ class RoomPlayInfoData {
roomId: json['room_id'] as int?,
shortId: json['short_id'] as int?,
uid: json['uid'] as int?,
isHidden: json['is_hidden'] as bool?,
isLocked: json['is_locked'] as bool?,
isPortrait: json['is_portrait'] as bool?,
liveStatus: json['live_status'] as int?,
hiddenTill: json['hidden_till'] as int?,
lockTill: json['lock_till'] as int?,
encrypted: json['encrypted'] as bool?,
pwdVerified: json['pwd_verified'] as bool?,
liveTime: json['live_time'] as int?,
roomShield: json['room_shield'] as int?,
allSpecialTypes: json['all_special_types'] as List<dynamic>?,
playurlInfo: json['playurl_info'] == null
? null
: PlayurlInfo.fromJson(
json['playurl_info'] as Map<String, dynamic>,
),
officialType: json['official_type'] as int?,
officialRoomId: json['official_room_id'] as int?,
riskWithDelay: json['risk_with_delay'] as int?,
multiScreenInfo: json['multi_screen_info'] as String?,
pureControlFunction: json['pure_control_function'] as dynamic,
degradedPlayurl: json['degraded_playurl'] as dynamic,
);
}

View File

@@ -1,13 +0,0 @@
class ExpectedQuality {
int? qn;
int? hdrType;
ExpectedQuality({this.qn, this.hdrType});
factory ExpectedQuality.fromJson(Map<String, dynamic> json) {
return ExpectedQuality(
qn: json['qn'] as int?,
hdrType: json['hdr_type'] as int?,
);
}
}

View File

@@ -1,26 +0,0 @@
class GQnDesc {
int? qn;
String? desc;
String? hdrDesc;
dynamic attrDesc;
int? hdrType;
dynamic mediaBaseDesc;
GQnDesc({
this.qn,
this.desc,
this.hdrDesc,
this.attrDesc,
this.hdrType,
this.mediaBaseDesc,
});
factory GQnDesc.fromJson(Map<String, dynamic> json) => GQnDesc(
qn: json['qn'] as int?,
desc: json['desc'] as String?,
hdrDesc: json['hdr_desc'] as String?,
attrDesc: json['attr_desc'] as dynamic,
hdrType: json['hdr_type'] as int?,
mediaBaseDesc: json['media_base_desc'] as dynamic,
);
}

View File

@@ -1,15 +0,0 @@
class P2pData {
bool? p2p;
int? p2pType;
bool? mP2p;
dynamic mServers;
P2pData({this.p2p, this.p2pType, this.mP2p, this.mServers});
factory P2pData.fromJson(Map<String, dynamic> json) => P2pData(
p2p: json['p2p'] as bool?,
p2pType: json['p2p_type'] as int?,
mP2p: json['m_p2p'] as bool?,
mServers: json['m_servers'] as dynamic,
);
}

View File

@@ -1,33 +1,18 @@
import 'package:PiliPlus/models_new/live/live_room_play_info/g_qn_desc.dart';
import 'package:PiliPlus/models_new/live/live_room_play_info/p2p_data.dart';
import 'package:PiliPlus/models_new/live/live_room_play_info/stream.dart';
class Playurl {
int? cid;
List<GQnDesc>? gQnDesc;
List<Stream>? stream;
P2pData? p2pData;
dynamic dolbyQn;
Playurl({
this.cid,
this.gQnDesc,
this.stream,
this.p2pData,
this.dolbyQn,
});
factory Playurl.fromJson(Map<String, dynamic> json) => Playurl(
cid: json['cid'] as int?,
gQnDesc: (json['g_qn_desc'] as List<dynamic>?)
?.map((e) => GQnDesc.fromJson(e as Map<String, dynamic>))
.toList(),
stream: (json['stream'] as List<dynamic>?)
?.map((e) => Stream.fromJson(e as Map<String, dynamic>))
.toList(),
p2pData: json['p2p_data'] == null
? null
: P2pData.fromJson(json['p2p_data'] as Map<String, dynamic>),
dolbyQn: json['dolby_qn'] as dynamic,
);
}

View File

@@ -1,29 +1,15 @@
import 'package:PiliPlus/models_new/live/live_room_play_info/expected_quality.dart';
import 'package:PiliPlus/models_new/live/live_room_play_info/playurl.dart';
class PlayurlInfo {
String? confJson;
Playurl? playurl;
ExpectedQuality? expectedQuality;
int? qnDescMoreAb;
PlayurlInfo({
this.confJson,
this.playurl,
this.expectedQuality,
this.qnDescMoreAb,
});
factory PlayurlInfo.fromJson(Map<String, dynamic> json) => PlayurlInfo(
confJson: json['conf_json'] as String?,
playurl: json['playurl'] == null
? null
: Playurl.fromJson(json['playurl'] as Map<String, dynamic>),
expectedQuality: json['expected_quality'] == null
? null
: ExpectedQuality.fromJson(
json['expected_quality'] as Map<String, dynamic>,
),
qnDescMoreAb: json['qn_desc_more_ab'] as int?,
);
}

View File

@@ -7,9 +7,6 @@ class LiveSearchData {
int? pagesize;
Room? room;
User? user;
String? trackId;
String? abtestId;
String? query;
LiveSearchData({
this.type,
@@ -17,9 +14,6 @@ class LiveSearchData {
this.pagesize,
this.room,
this.user,
this.trackId,
this.abtestId,
this.query,
});
factory LiveSearchData.fromJson(Map<String, dynamic> json) => LiveSearchData(
@@ -32,8 +26,5 @@ class LiveSearchData {
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
trackId: json['track_id'] as String?,
abtestId: json['abtest_id'] as String?,
query: json['query'] as String?,
);
}

View File

@@ -6,8 +6,6 @@ class LiveSearchRoomItemModel {
String? title;
String? name;
String? face;
int? online;
String? link;
WatchedShow? watchedShow;
LiveSearchRoomItemModel({
@@ -16,8 +14,6 @@ class LiveSearchRoomItemModel {
this.title,
this.name,
this.face,
this.online,
this.link,
this.watchedShow,
});
@@ -28,8 +24,6 @@ class LiveSearchRoomItemModel {
title: json['title'] as String?,
name: json['name'] as String?,
face: json['face'] as String?,
online: json['online'] as int?,
link: json['link'] as String?,
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(

View File

@@ -5,7 +5,6 @@ class LiveSearchUserItemModel {
String? areaName;
int? fansNum;
int? roomid;
String? link;
LiveSearchUserItemModel({
this.face,
@@ -14,7 +13,6 @@ class LiveSearchUserItemModel {
this.areaName,
this.fansNum,
this.roomid,
this.link,
});
factory LiveSearchUserItemModel.fromJson(Map<String, dynamic> json) =>
@@ -25,6 +23,5 @@ class LiveSearchUserItemModel {
areaName: json['areaName'] as String?,
fansNum: json['fansNum'] as int?,
roomid: json['roomid'] as int?,
link: json['link'] as String?,
);
}

View File

@@ -1,5 +1,4 @@
import 'package:PiliPlus/models_new/msg/msg_like/content.dart';
import 'package:PiliPlus/models_new/msg/msg_like/user.dart';
class MsgLikeItem {

View File

@@ -1,5 +1,4 @@
import 'package:PiliPlus/models_new/msg/msg_reply/content.dart';
import 'package:PiliPlus/models_new/msg/msg_reply/user.dart';
class MsgReplyItem {

View File

@@ -1,5 +1,5 @@
import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class MusicDetail {
MusicDetail({

View File

@@ -1,5 +1,5 @@
import 'package:PiliPlus/models_new/reply/pagination_reply.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class ReplyCursor {
bool? isBegin;

View File

@@ -1,5 +1,4 @@
import 'package:PiliPlus/models/model_avatar.dart';
import 'package:PiliPlus/models_new/reply/level_info.dart';
import 'package:PiliPlus/models_new/reply/nameplate.dart';
import 'package:PiliPlus/models_new/reply/senior.dart';

View File

@@ -2,7 +2,7 @@ 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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class SpaceArticleItem {
int? id;

View File

@@ -1,4 +1,4 @@
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class SpaceCheeseItem {
bool? cooperated;

View File

@@ -1,6 +1,6 @@
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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class SpaceSsModel {
List<SpaceSsArchive>? archives;

View File

@@ -5,7 +5,7 @@ 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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class SpaceShopItem {
String? contentId;

View File

@@ -2,7 +2,7 @@ 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.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
class UpowerRankData {
UpInfo? upInfo;

View File

@@ -1,7 +1,7 @@
import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/models_new/video/video_detail/argue_info.dart';
import 'package:PiliPlus/models_new/video/video_detail/desc_v2.dart';
import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
import 'package:PiliPlus/models_new/video/video_detail/owner.dart';
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';

View File

@@ -1,13 +0,0 @@
class Owner {
int? mid;
String? name;
String? face;
Owner({this.mid, this.name, this.face});
factory Owner.fromJson(Map<String, dynamic> json) => Owner(
mid: json['mid'] as int?,
name: json['name'] as String?,
face: json['face'] as String?,
);
}

View File

@@ -1,4 +1,5 @@
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
import 'package:PiliPlus/utils/extension/string_ext.dart';
class VideoShotData {
String? pvdata;