Merge branch 'main' into feature-minePage

This commit is contained in:
guozhigq
2024-09-28 21:24:06 +08:00
57 changed files with 3794 additions and 332 deletions

126
lib/models/live/follow.dart Normal file
View File

@ -0,0 +1,126 @@
class LiveFollowingModel {
int? count;
List<LiveFollowingItemModel>? list;
int? liveCount;
int? neverLivedCount;
List? neverLivedFaces;
int? pageSize;
String? title;
int? totalPage;
LiveFollowingModel({
this.count,
this.list,
this.liveCount,
this.neverLivedCount,
this.neverLivedFaces,
this.pageSize,
this.title,
this.totalPage,
});
LiveFollowingModel.fromJson(Map<String, dynamic> json) {
count = json['count'];
if (json['list'] != null) {
list = <LiveFollowingItemModel>[];
json['list'].forEach((v) {
list!.add(LiveFollowingItemModel.fromJson(v));
});
}
liveCount = json['live_count'];
neverLivedCount = json['never_lived_count'];
if (json['never_lived_faces'] != null) {
neverLivedFaces = <dynamic>[];
json['never_lived_faces'].forEach((v) {
neverLivedFaces!.add(v);
});
}
pageSize = json['pageSize'];
title = json['title'];
totalPage = json['totalPage'];
}
}
class LiveFollowingItemModel {
int? roomId;
int? uid;
String? uname;
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;
String? watchIcon;
String? textSmall;
String? roomCover;
String? pic;
int? parentAreaId;
int? areaId;
LiveFollowingItemModel({
this.roomId,
this.uid,
this.uname,
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.watchIcon,
this.textSmall,
this.roomCover,
this.pic,
this.parentAreaId,
this.areaId,
});
LiveFollowingItemModel.fromJson(Map<String, dynamic> json) {
roomId = json['roomid'];
uid = json['uid'];
uname = json['uname'];
title = json['title'];
face = json['face'];
liveStatus = json['live_status'];
recordNum = json['record_num'];
recentRecordId = json['recent_record_id'];
isAttention = json['is_attention'];
clipNum = json['clipnum'];
fansNum = json['fans_num'];
areaName = json['area_name'];
areaValue = json['area_value'];
tags = json['tags'];
recentRecordIdV2 = json['recent_record_id_v2'];
recordNumV2 = json['record_num_v2'];
recordLiveTime = json['record_live_time'];
areaNameV2 = json['area_name_v2'];
roomNews = json['room_news'];
watchIcon = json['watch_icon'];
textSmall = json['text_small'];
roomCover = json['room_cover'];
pic = json['room_cover'];
parentAreaId = json['parent_area_id'];
areaId = json['area_id'];
}
}

View File

@ -1,11 +1,13 @@
class RoomInfoModel {
RoomInfoModel({
this.roomId,
this.isPortrait,
this.liveStatus,
this.liveTime,
this.playurlInfo,
});
int? roomId;
bool? isPortrait;
int? liveStatus;
int? liveTime;
PlayurlInfo? playurlInfo;
@ -13,6 +15,7 @@ class RoomInfoModel {
RoomInfoModel.fromJson(Map<String, dynamic> json) {
roomId = json['room_id'];
liveStatus = json['live_status'];
isPortrait = json['is_portrait'];
liveTime = json['live_time'];
playurlInfo = PlayurlInfo.fromJson(json['playurl_info']);
}

View File

@ -0,0 +1,46 @@
class MemberArticleDataModel {
MemberArticleDataModel({
this.hasMore,
this.items,
this.offset,
this.updateNum,
});
bool? hasMore;
List<MemberArticleItemModel>? items;
String? offset;
int? updateNum;
MemberArticleDataModel.fromJson(Map<String, dynamic> json) {
hasMore = json['has_more'];
items = json['items']
.map<MemberArticleItemModel>((e) => MemberArticleItemModel.fromJson(e))
.toList();
offset = json['offset'];
updateNum = json['update_num'];
}
}
class MemberArticleItemModel {
MemberArticleItemModel({
this.content,
this.cover,
this.jumpUrl,
this.opusId,
this.stat,
});
String? content;
Map? cover;
String? jumpUrl;
String? opusId;
Map? stat;
MemberArticleItemModel.fromJson(Map<String, dynamic> json) {
content = json['content'];
cover = json['cover'];
jumpUrl = json['jump_url'];
opusId = json['opus_id'];
stat = json['stat'];
}
}

485
lib/models/read/opus.dart Normal file
View File

@ -0,0 +1,485 @@
class OpusDataModel {
OpusDataModel({
this.id,
this.detail,
this.type,
this.theme,
this.themeMode,
});
String? id;
OpusDetailDataModel? detail;
int? type;
String? theme;
String? themeMode;
OpusDataModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
detail = json['detail'] != null
? OpusDetailDataModel.fromJson(json['detail'])
: null;
type = json['type'];
theme = json['theme'];
themeMode = json['themeMode'];
}
}
class OpusDetailDataModel {
OpusDetailDataModel({
this.basic,
this.idStr,
this.modules,
this.type,
});
Basic? basic;
String? idStr;
List<OpusModuleDataModel>? modules;
int? type;
OpusDetailDataModel.fromJson(Map<String, dynamic> json) {
basic = json['basic'] != null ? Basic.fromJson(json['basic']) : null;
idStr = json['id_str'];
if (json['modules'] != null) {
modules = <OpusModuleDataModel>[];
json['modules'].forEach((v) {
modules!.add(OpusModuleDataModel.fromJson(v));
});
}
type = json['type'];
}
}
class Basic {
Basic({
this.commentIdStr,
this.commentType,
this.ridStr,
this.title,
this.uid,
});
String? commentIdStr;
int? commentType;
String? ridStr;
String? title;
int? uid;
Basic.fromJson(Map<String, dynamic> json) {
commentIdStr = json['comment_id_str'];
commentType = json['comment_type'];
ridStr = json['rid_str'];
title = json['title'];
uid = json['uid'];
}
}
class OpusModuleDataModel {
OpusModuleDataModel({
this.moduleTitle,
this.moduleAuthor,
this.moduleContent,
this.moduleExtend,
this.moduleBottom,
this.moduleStat,
});
ModuleTop? moduleTop;
ModuleTitle? moduleTitle;
ModuleAuthor? moduleAuthor;
ModuleContent? moduleContent;
ModuleExtend? moduleExtend;
ModuleBottom? moduleBottom;
ModuleStat? moduleStat;
OpusModuleDataModel.fromJson(Map<String, dynamic> json) {
moduleTop = json['module_top'] != null
? ModuleTop.fromJson(json['module_top'])
: null;
moduleTitle = json['module_title'] != null
? ModuleTitle.fromJson(json['module_title'])
: null;
moduleAuthor = json['module_author'] != null
? ModuleAuthor.fromJson(json['module_author'])
: null;
moduleContent = json['module_content'] != null
? ModuleContent.fromJson(json['module_content'])
: null;
moduleExtend = json['module_extend'] != null
? ModuleExtend.fromJson(json['module_extend'])
: null;
moduleBottom = json['module_bottom'] != null
? ModuleBottom.fromJson(json['module_bottom'])
: null;
moduleStat = json['module_stat'] != null
? ModuleStat.fromJson(json['module_stat'])
: null;
}
}
class ModuleTop {
ModuleTop({
this.type,
this.video,
});
int? type;
Map? video;
ModuleTop.fromJson(Map<String, dynamic> json) {
type = json['type'];
video = json['video'];
}
}
class ModuleTitle {
ModuleTitle({
this.text,
});
String? text;
ModuleTitle.fromJson(Map<String, dynamic> json) {
text = json['text'];
}
}
class ModuleAuthor {
ModuleAuthor({
this.face,
this.mid,
this.name,
this.pubTime,
});
String? face;
int? mid;
String? name;
String? pubTime;
ModuleAuthor.fromJson(Map<String, dynamic> json) {
face = json['face'];
mid = json['mid'];
name = json['name'];
pubTime = json['pub_time'];
}
}
class ModuleContent {
ModuleContent({
this.paragraphs,
this.moduleType,
});
List<ModuleParagraph>? paragraphs;
String? moduleType;
ModuleContent.fromJson(Map<String, dynamic> json) {
if (json['paragraphs'] != null) {
paragraphs = <ModuleParagraph>[];
json['paragraphs'].forEach((v) {
paragraphs!.add(ModuleParagraph.fromJson(v));
});
}
moduleType = json['module_type'];
}
}
class ModuleParagraph {
ModuleParagraph({
this.align,
this.paraType,
this.pic,
this.text,
});
// 0 左对齐 1 居中 2 右对齐
int? align;
int? paraType;
Pics? pic;
ModuleParagraphText? text;
LinkCard? linkCard;
ModuleParagraph.fromJson(Map<String, dynamic> json) {
align = json['align'];
paraType = json['para_type'] == null && json['link_card'] != null
? 3
: json['para_type'];
pic = json['pic'] != null ? Pics.fromJson(json['pic']) : null;
text = json['text'] != null
? ModuleParagraphText.fromJson(json['text'])
: null;
linkCard =
json['link_card'] != null ? LinkCard.fromJson(json['link_card']) : null;
}
}
class Pics {
Pics({
this.pics,
this.style,
});
List<Pic>? pics;
int? style;
Pics.fromJson(Map<String, dynamic> json) {
if (json['pics'] != null) {
pics = <Pic>[];
json['pics'].forEach((v) {
pics!.add(Pic.fromJson(v));
});
}
style = json['style'];
}
}
class Pic {
Pic({
this.height,
this.size,
this.url,
this.width,
this.aspectRatio,
this.scale,
});
int? height;
double? size;
String? url;
int? width;
double? aspectRatio;
double? scale;
Pic.fromJson(Map<String, dynamic> json) {
height = json['height'];
size = json['size'];
url = json['url'];
width = json['width'];
aspectRatio = json['width'] / json['height'];
scale = customDivision(json['width'], 600);
}
}
class LinkCard {
LinkCard({
this.cover,
this.descSecond,
this.duration,
this.jumpUrl,
this.title,
});
String? cover;
String? descSecond;
String? duration;
String? jumpUrl;
String? title;
LinkCard.fromJson(Map<String, dynamic> json) {
cover = json['card']['cover'];
descSecond = json['card']['desc_second'];
duration = json['card']['duration'];
jumpUrl = json['card']['jump_url'];
title = json['card']['title'];
}
}
class ModuleParagraphText {
ModuleParagraphText({
this.nodes,
});
List<ModuleParagraphTextNode>? nodes;
ModuleParagraphText.fromJson(Map<String, dynamic> json) {
if (json['nodes'] != null) {
nodes = <ModuleParagraphTextNode>[];
json['nodes'].forEach((v) {
nodes!.add(ModuleParagraphTextNode.fromJson(v));
});
}
}
}
class ModuleParagraphTextNode {
ModuleParagraphTextNode({
this.type,
this.nodeType,
this.word,
});
String? type;
int? nodeType;
ModuleParagraphTextNodeWord? word;
ModuleParagraphTextNode.fromJson(Map<String, dynamic> json) {
type = json['type'];
nodeType = json['node_type'];
word = json['word'] != null
? ModuleParagraphTextNodeWord.fromJson(json['word'])
: null;
}
}
class ModuleParagraphTextNodeWord {
ModuleParagraphTextNodeWord({
this.color,
this.fontSize,
this.style,
this.words,
});
String? color;
int? fontSize;
ModuleParagraphTextNodeWordStyle? style;
String? words;
ModuleParagraphTextNodeWord.fromJson(Map<String, dynamic> json) {
color = json['color'];
fontSize = json['font_size'];
style = json['style'] != null
? ModuleParagraphTextNodeWordStyle.fromJson(json['style'])
: null;
words = json['words'];
}
}
class ModuleParagraphTextNodeWordStyle {
ModuleParagraphTextNodeWordStyle({
this.bold,
});
bool? bold;
ModuleParagraphTextNodeWordStyle.fromJson(Map<String, dynamic> json) {
bold = json['bold'];
}
}
class ModuleExtend {
ModuleExtend({
this.items,
});
List<ModuleExtendItem>? items;
ModuleExtend.fromJson(Map<String, dynamic> json) {
if (json['items'] != null) {
items = <ModuleExtendItem>[];
json['items'].forEach((v) {
items!.add(ModuleExtendItem.fromJson(v));
});
}
}
}
class ModuleExtendItem {
ModuleExtendItem({
this.bizId,
this.bizType,
this.icon,
this.jumpUrl,
this.text,
});
dynamic bizId;
int? bizType;
dynamic icon;
String? jumpUrl;
String? text;
ModuleExtendItem.fromJson(Map<String, dynamic> json) {
bizId = json['biz_id'];
bizType = json['biz_type'];
icon = json['icon'];
jumpUrl = json['jump_url'];
text = json['text'];
}
}
class ModuleBottom {
ModuleBottom({
this.shareInfo,
});
ShareInfo? shareInfo;
ModuleBottom.fromJson(Map<String, dynamic> json) {
shareInfo = json['share_info'] != null
? ShareInfo.fromJson(json['share_info'])
: null;
}
}
class ShareInfo {
ShareInfo({
this.pic,
this.summary,
this.title,
});
String? pic;
String? summary;
String? title;
ShareInfo.fromJson(Map<String, dynamic> json) {
pic = json['pic'];
summary = json['summary'];
title = json['title'];
}
}
class ModuleStat {
ModuleStat({
this.coin,
this.comment,
this.favorite,
this.forward,
this.like,
});
StatItem? coin;
StatItem? comment;
StatItem? favorite;
StatItem? forward;
StatItem? like;
ModuleStat.fromJson(Map<String, dynamic> json) {
coin = json['coin'] != null ? StatItem.fromJson(json['coin']) : null;
comment =
json['comment'] != null ? StatItem.fromJson(json['comment']) : null;
favorite =
json['favorite'] != null ? StatItem.fromJson(json['favorite']) : null;
forward =
json['forward'] != null ? StatItem.fromJson(json['forward']) : null;
like = json['like'] != null ? StatItem.fromJson(json['like']) : null;
}
}
class StatItem {
StatItem({
this.count,
this.forbidden,
this.status,
});
int? count;
bool? forbidden;
bool? status;
StatItem.fromJson(Map<String, dynamic> json) {
count = json['count'];
forbidden = json['forbidden'];
status = json['status'];
}
}
double customDivision(int a, int b) {
double result = a / b;
if (result < 1) {
return result;
} else {
return 1.0;
}
}

286
lib/models/read/read.dart Normal file
View File

@ -0,0 +1,286 @@
import 'package:pilipala/models/member/info.dart';
import 'opus.dart';
class ReadDataModel {
ReadDataModel({
this.cvid,
this.readInfo,
this.readViewInfo,
this.upInfo,
this.catalogList,
this.recommendInfoList,
this.hiddenInteraction,
this.isModern,
});
int? cvid;
ReadInfo? readInfo;
Map? readViewInfo;
Map? upInfo;
List<dynamic>? catalogList;
List<dynamic>? recommendInfoList;
bool? hiddenInteraction;
bool? isModern;
ReadDataModel.fromJson(Map<String, dynamic> json) {
cvid = json['cvid'];
readInfo =
json['readInfo'] != null ? ReadInfo.fromJson(json['readInfo']) : null;
readViewInfo = json['readViewInfo'];
upInfo = json['upInfo'];
if (json['catalogList'] != null) {
catalogList = <dynamic>[];
json['catalogList'].forEach((v) {
catalogList!.add(v);
});
}
if (json['recommendInfoList'] != null) {
recommendInfoList = <dynamic>[];
json['recommendInfoList'].forEach((v) {
recommendInfoList!.add(v);
});
}
hiddenInteraction = json['hiddenInteraction'];
isModern = json['isModern'];
}
}
class ReadInfo {
ReadInfo({
this.id,
this.category,
this.title,
this.summary,
this.bannerUrl,
this.author,
this.publishTime,
this.ctime,
this.mtime,
this.stats,
this.attributes,
this.words,
this.originImageUrls,
this.content,
this.opus,
this.dynIdStr,
this.totalArtNum,
});
int? id;
Map? category;
String? title;
String? summary;
String? bannerUrl;
Author? author;
int? publishTime;
int? ctime;
int? mtime;
Map? stats;
int? attributes;
int? words;
List<String>? originImageUrls;
String? content;
Opus? opus;
String? dynIdStr;
int? totalArtNum;
ReadInfo.fromJson(Map<String, dynamic> json) {
id = json['id'];
category = json['category'];
title = json['title'];
summary = json['summary'];
bannerUrl = json['banner_url'];
author = Author.fromJson(json['author']);
publishTime = json['publish_time'];
ctime = json['ctime'];
mtime = json['mtime'];
stats = json['stats'];
attributes = json['attributes'];
words = json['words'];
if (json['origin_image_urls'] != null) {
originImageUrls = <String>[];
json['origin_image_urls'].forEach((v) {
originImageUrls!.add(v);
});
}
content = json['content'];
opus = json['opus'] != null ? Opus.fromJson(json['opus']) : null;
dynIdStr = json['dyn_id_str'];
totalArtNum = json['total_art_num'];
}
}
class Author {
Author({
this.mid,
this.name,
this.face,
this.vip,
this.fans,
this.level,
});
int? mid;
String? name;
String? face;
Vip? vip;
int? fans;
int? level;
Author.fromJson(Map<String, dynamic> json) {
mid = json['mid'];
name = json['name'];
face = json['face'];
vip = json['vip'] != null ? Vip.fromJson(json['vip']) : null;
fans = json['fans'];
level = json['level'];
}
}
class Opus {
// "opus_id": 976625853207150600,
// "opus_source": 2,
// "title": "真的很想骂人 但又没什么好骂的",
// "content": {
// "paragraphs": [{
// "para_type": 1,
// "text": {
// "nodes": [{
// "node_type": 1,
// "word": {
// "words": "21年玩到今年4月的号没了 ow1的时候45的号 玩了三年 后面第9赛季一个英杰5的号虽然是偷的 但我任何违规行为都没有还是给我封了) 最近玩的号叫velleity 只和队友打天梯以及训练赛 又没了 连带着我一个一把没玩过只玩过一场训练赛的小号也没了 实在是无话可说了...",
// "font_size": 17,
// "style": {},
// "font_level": "regular"
// }
// }]
// }
// }, {
// "para_type": 2,
// "pic": {
// "pics": [{
// "url": "https:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fnew_dyn\u002Fba4e57459451fe74dcb70fd20bde9823316082117.jpg",
// "width": 1600,
// "height": 1000,
// "size": 588.482421875
// }],
// "style": 1
// }
// }, {
// "para_type": 1,
// "text": {
// "nodes": [{
// "node_type": 1,
// "word": {
// "words": "\n",
// "font_size": 17,
// "style": {},
// "font_level": "regular"
// }
// }]
// }
// }, {
// "para_type": 2,
// "pic": {
// "pics": [{
// "url": "https:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fnew_dyn\u002F0945be6b621091ddb8189482a87a36fb316082117.jpg",
// "width": 1600,
// "height": 1002,
// "size": 665.7861328125
// }],
// "style": 1
// }
// }, {
// "para_type": 1,
// "text": {
// "nodes": [{
// "node_type": 1,
// "word": {
// "words": "\n",
// "font_size": 17,
// "style": {},
// "font_level": "regular"
// }
// }]
// }
// }, {
// "para_type": 2,
// "pic": {
// "pics": [{
// "url": "https:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fnew_dyn\u002Ffa60649f8786578a764a1e68a2c5d23f316082117.jpg",
// "width": 1600,
// "height": 999,
// "size": 332.970703125
// }],
// "style": 1
// }
// }, {
// "para_type": 1,
// "text": {
// "nodes": [{
// "node_type": 1,
// "word": {
// "words": "\n",
// "font_size": 17,
// "style": {},
// "font_level": "regular"
// }
// }]
// }
// }]
// },
// "pub_info": {
// "uid": 316082117,
// "pub_time": 1726226826
// },
// "article": {
// "category_id": 15,
// "cover": [{
// "url": "https:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fnew_dyn\u002Fbanner\u002Feb10074186a62f98c18e1b5b9deb38be316082117.png",
// "width": 1071,
// "height": 315,
// "size": 225.625
// }]
// },
// "version": {
// "cvid": 38660379,
// "version_id": 101683514411343360
// }
Opus({
this.opusId,
this.opusSource,
this.title,
this.content,
});
int? opusId;
int? opusSource;
String? title;
Content? content;
Opus.fromJson(Map<String, dynamic> json) {
opusId = json['opus_id'];
opusSource = json['opus_source'];
title = json['title'];
content =
json['content'] != null ? Content.fromJson(json['content']) : null;
}
}
class Content {
Content({
this.paragraphs,
});
List<ModuleParagraph>? paragraphs;
Content.fromJson(Map<String, dynamic> json) {
if (json['paragraphs'] != null) {
paragraphs = <ModuleParagraph>[];
json['paragraphs'].forEach((v) {
paragraphs!.add(ModuleParagraph.fromJson(v));
});
}
}
}

270
lib/models/video/later.dart Normal file
View File

@ -0,0 +1,270 @@
class MediaVideoItemModel {
MediaVideoItemModel({
this.id,
this.offset,
this.index,
this.intro,
this.attr,
this.tid,
this.copyRight,
this.cntInfo,
this.cover,
this.duration,
this.pubtime,
this.likeState,
this.favState,
this.page,
this.pages,
this.title,
this.type,
this.upper,
this.link,
this.bvId,
this.shortLink,
this.rights,
this.elecInfo,
this.coin,
this.progressPercent,
this.badge,
this.forbidFav,
this.moreType,
this.businessOid,
});
int? id;
int? offset;
int? index;
String? intro;
int? attr;
int? tid;
int? copyRight;
Map? cntInfo;
String? cover;
int? duration;
int? pubtime;
int? likeState;
int? favState;
int? page;
List<Page>? pages;
String? title;
int? type;
Upper? upper;
String? link;
String? bvId;
String? shortLink;
Rights? rights;
dynamic elecInfo;
Coin? coin;
double? progressPercent;
dynamic badge;
bool? forbidFav;
int? moreType;
int? businessOid;
factory MediaVideoItemModel.fromJson(Map<String, dynamic> json) =>
MediaVideoItemModel(
id: json["id"],
offset: json["offset"],
index: json["index"],
intro: json["intro"],
attr: json["attr"],
tid: json["tid"],
copyRight: json["copy_right"],
cntInfo: json["cnt_info"],
cover: json["cover"],
duration: json["duration"],
pubtime: json["pubtime"],
likeState: json["like_state"],
favState: json["fav_state"],
page: json["page"],
// json["pages"] 可能为null
pages: json["pages"] == null
? []
: List<Page>.from(json["pages"].map((x) => Page.fromJson(x))),
title: json["title"],
type: json["type"],
upper: Upper.fromJson(json["upper"]),
link: json["link"],
bvId: json["bv_id"],
shortLink: json["short_link"],
rights: Rights.fromJson(json["rights"]),
elecInfo: json["elec_info"],
coin: Coin.fromJson(json["coin"]),
progressPercent: json["progress_percent"].toDouble(),
badge: json["badge"],
forbidFav: json["forbid_fav"],
moreType: json["more_type"],
businessOid: json["business_oid"],
);
}
class Coin {
Coin({
this.maxNum,
this.coinNumber,
});
int? maxNum;
int? coinNumber;
factory Coin.fromJson(Map<String, dynamic> json) => Coin(
maxNum: json["max_num"],
coinNumber: json["coin_number"],
);
}
class Page {
Page({
this.id,
this.title,
this.intro,
this.duration,
this.link,
this.page,
this.metas,
this.from,
this.dimension,
});
int? id;
String? title;
String? intro;
int? duration;
String? link;
int? page;
List<Meta>? metas;
String? from;
Dimension? dimension;
factory Page.fromJson(Map<String, dynamic> json) => Page(
id: json["id"],
title: json["title"],
intro: json["intro"],
duration: json["duration"],
link: json["link"],
page: json["page"],
metas: List<Meta>.from(json["metas"].map((x) => Meta.fromJson(x))),
from: json["from"],
dimension: Dimension.fromJson(json["dimension"]),
);
}
class Dimension {
Dimension({
this.width,
this.height,
this.rotate,
});
int? width;
int? height;
int? rotate;
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json["width"],
height: json["height"],
rotate: json["rotate"],
);
}
class Meta {
Meta({
this.quality,
this.size,
});
int? quality;
int? size;
factory Meta.fromJson(Map<String, dynamic> json) => Meta(
quality: json["quality"],
size: json["size"],
);
}
class Rights {
Rights({
this.bp,
this.elec,
this.download,
this.movie,
this.pay,
this.ugcPay,
this.hd5,
this.noReprint,
this.autoplay,
this.noBackground,
});
int? bp;
int? elec;
int? download;
int? movie;
int? pay;
int? ugcPay;
int? hd5;
int? noReprint;
int? autoplay;
int? noBackground;
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
bp: json["bp"],
elec: json["elec"],
download: json["download"],
movie: json["movie"],
pay: json["pay"],
ugcPay: json["ugc_pay"],
hd5: json["hd5"],
noReprint: json["no_reprint"],
autoplay: json["autoplay"],
noBackground: json["no_background"],
);
}
class Upper {
Upper({
this.mid,
this.name,
this.face,
this.followed,
this.fans,
this.vipType,
this.vipStatue,
this.vipDueDate,
this.vipPayType,
this.officialRole,
this.officialTitle,
this.officialDesc,
this.displayName,
});
int? mid;
String? name;
String? face;
int? followed;
int? fans;
int? vipType;
int? vipStatue;
int? vipDueDate;
int? vipPayType;
int? officialRole;
String? officialTitle;
String? officialDesc;
String? displayName;
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
mid: json["mid"],
name: json["name"],
face: json["face"],
followed: json["followed"],
fans: json["fans"],
vipType: json["vip_type"],
vipStatue: json["vip_statue"],
vipDueDate: json["vip_due_date"],
vipPayType: json["vip_pay_type"],
officialRole: json["official_role"],
officialTitle: json["official_title"],
officialDesc: json["official_desc"],
displayName: json["display_name"],
);
}