mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-28 06:15:51 +08:00
30
lib/models_new/reply/content.dart
Normal file
30
lib/models_new/reply/content.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:PiliPlus/models_new/reply/picture.dart';
|
||||
|
||||
class ReplyContent {
|
||||
String? message;
|
||||
List<dynamic>? members;
|
||||
Map? jumpUrl;
|
||||
int? maxLine;
|
||||
List<ReplyPicture>? pictures;
|
||||
double? pictureScale;
|
||||
|
||||
ReplyContent({
|
||||
this.message,
|
||||
this.members,
|
||||
this.jumpUrl,
|
||||
this.maxLine,
|
||||
this.pictures,
|
||||
this.pictureScale,
|
||||
});
|
||||
|
||||
factory ReplyContent.fromJson(Map<String, dynamic> json) => ReplyContent(
|
||||
message: json['message'] as String?,
|
||||
members: json['members'] as List<dynamic>?,
|
||||
jumpUrl: json['jump_url'],
|
||||
maxLine: json['max_line'] as int?,
|
||||
pictures: (json['pictures'] as List<dynamic>?)
|
||||
?.map((e) => ReplyPicture.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pictureScale: (json['picture_scale'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
65
lib/models_new/reply/control.dart
Normal file
65
lib/models_new/reply/control.dart
Normal file
@@ -0,0 +1,65 @@
|
||||
class ReplyControl {
|
||||
bool? inputDisable;
|
||||
String? rootInputText;
|
||||
String? childInputText;
|
||||
String? giveupInputText;
|
||||
int? screenshotIconState;
|
||||
int? uploadPictureIconState;
|
||||
String? answerGuideText;
|
||||
String? answerGuideIconUrl;
|
||||
String? answerGuideIosUrl;
|
||||
String? answerGuideAndroidUrl;
|
||||
String? bgText;
|
||||
dynamic emptyPage;
|
||||
int? showType;
|
||||
String? showText;
|
||||
bool? webSelection;
|
||||
bool? disableJumpEmote;
|
||||
bool? enableCharged;
|
||||
bool? enableCmBizHelper;
|
||||
dynamic preloadResources;
|
||||
|
||||
ReplyControl({
|
||||
this.inputDisable,
|
||||
this.rootInputText,
|
||||
this.childInputText,
|
||||
this.giveupInputText,
|
||||
this.screenshotIconState,
|
||||
this.uploadPictureIconState,
|
||||
this.answerGuideText,
|
||||
this.answerGuideIconUrl,
|
||||
this.answerGuideIosUrl,
|
||||
this.answerGuideAndroidUrl,
|
||||
this.bgText,
|
||||
this.emptyPage,
|
||||
this.showType,
|
||||
this.showText,
|
||||
this.webSelection,
|
||||
this.disableJumpEmote,
|
||||
this.enableCharged,
|
||||
this.enableCmBizHelper,
|
||||
this.preloadResources,
|
||||
});
|
||||
|
||||
factory ReplyControl.fromJson(Map<String, dynamic> json) => ReplyControl(
|
||||
inputDisable: json['input_disable'] as bool?,
|
||||
rootInputText: json['root_input_text'] as String?,
|
||||
childInputText: json['child_input_text'] as String?,
|
||||
giveupInputText: json['giveup_input_text'] as String?,
|
||||
screenshotIconState: json['screenshot_icon_state'] as int?,
|
||||
uploadPictureIconState: json['upload_picture_icon_state'] as int?,
|
||||
answerGuideText: json['answer_guide_text'] as String?,
|
||||
answerGuideIconUrl: json['answer_guide_icon_url'] as String?,
|
||||
answerGuideIosUrl: json['answer_guide_ios_url'] as String?,
|
||||
answerGuideAndroidUrl: json['answer_guide_android_url'] as String?,
|
||||
bgText: json['bg_text'] as String?,
|
||||
emptyPage: json['empty_page'] as dynamic,
|
||||
showType: json['show_type'] as int?,
|
||||
showText: json['show_text'] as String?,
|
||||
webSelection: json['web_selection'] as bool?,
|
||||
disableJumpEmote: json['disable_jump_emote'] as bool?,
|
||||
enableCharged: json['enable_charged'] as bool?,
|
||||
enableCmBizHelper: json['enable_cm_biz_helper'] as bool?,
|
||||
preloadResources: json['preload_resources'] as dynamic,
|
||||
);
|
||||
}
|
||||
46
lib/models_new/reply/cursor.dart
Normal file
46
lib/models_new/reply/cursor.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:PiliPlus/models_new/reply/pagination_reply.dart';
|
||||
|
||||
class ReplyCursor {
|
||||
bool? isBegin;
|
||||
int? prev;
|
||||
int? next;
|
||||
bool? isEnd;
|
||||
PaginationReply? paginationReply;
|
||||
String? sessionId;
|
||||
int? mode;
|
||||
String? modeText;
|
||||
int? allCount;
|
||||
List<int>? supportMode;
|
||||
String? name;
|
||||
|
||||
ReplyCursor({
|
||||
this.isBegin,
|
||||
this.prev,
|
||||
this.next,
|
||||
this.isEnd,
|
||||
this.paginationReply,
|
||||
this.sessionId,
|
||||
this.mode,
|
||||
this.modeText,
|
||||
this.allCount,
|
||||
this.supportMode,
|
||||
this.name,
|
||||
});
|
||||
|
||||
factory ReplyCursor.fromJson(Map<String, dynamic> json) => ReplyCursor(
|
||||
isBegin: json['is_begin'] as bool?,
|
||||
prev: json['prev'] as int?,
|
||||
next: json['next'] as int?,
|
||||
isEnd: json['is_end'] as bool?,
|
||||
paginationReply: json['pagination_reply'] == null
|
||||
? null
|
||||
: PaginationReply.fromJson(
|
||||
json['pagination_reply'] as Map<String, dynamic>),
|
||||
sessionId: json['session_id'] as String?,
|
||||
mode: json['mode'] as int?,
|
||||
modeText: json['mode_text'] as String?,
|
||||
allCount: json['all_count'] as int?,
|
||||
supportMode: (json['support_mode'] as List?)?.cast(),
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
72
lib/models_new/reply/data.dart
Normal file
72
lib/models_new/reply/data.dart
Normal file
@@ -0,0 +1,72 @@
|
||||
import 'package:PiliPlus/models_new/reply/control.dart';
|
||||
import 'package:PiliPlus/models_new/reply/cursor.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply.dart';
|
||||
import 'package:PiliPlus/models_new/reply/top.dart';
|
||||
import 'package:PiliPlus/models_new/reply/up_selection.dart';
|
||||
import 'package:PiliPlus/models_new/reply/upper.dart';
|
||||
|
||||
class ReplyData {
|
||||
ReplyCursor? cursor;
|
||||
List<ReplyItemModel>? replies;
|
||||
Top? top;
|
||||
List<ReplyItemModel>? topReplies;
|
||||
UpSelection? upSelection;
|
||||
int? assist;
|
||||
int? blacklist;
|
||||
int? vote;
|
||||
Upper? upper;
|
||||
ReplyControl? control;
|
||||
int? note;
|
||||
dynamic esportsGradeCard;
|
||||
dynamic callbacks;
|
||||
String? contextFeature;
|
||||
|
||||
ReplyData({
|
||||
this.cursor,
|
||||
this.replies,
|
||||
this.top,
|
||||
this.topReplies,
|
||||
this.upSelection,
|
||||
this.assist,
|
||||
this.blacklist,
|
||||
this.vote,
|
||||
this.upper,
|
||||
this.control,
|
||||
this.note,
|
||||
this.esportsGradeCard,
|
||||
this.callbacks,
|
||||
this.contextFeature,
|
||||
});
|
||||
|
||||
factory ReplyData.fromJson(Map<String, dynamic> json) => ReplyData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: ReplyCursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
replies: (json['replies'] as List<dynamic>?)
|
||||
?.map((e) => ReplyItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
top: json['top'] == null
|
||||
? null
|
||||
: Top.fromJson(json['top'] as Map<String, dynamic>),
|
||||
topReplies: (json['top_replies'] as List<dynamic>?)
|
||||
?.map((e) => ReplyItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
upSelection: json['up_selection'] == null
|
||||
? null
|
||||
: UpSelection.fromJson(
|
||||
json['up_selection'] as Map<String, dynamic>),
|
||||
assist: json['assist'] as int?,
|
||||
blacklist: json['blacklist'] as int?,
|
||||
vote: json['vote'] as int?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
control: json['control'] == null
|
||||
? null
|
||||
: ReplyControl.fromJson(json['control'] as Map<String, dynamic>),
|
||||
note: json['note'] as int?,
|
||||
esportsGradeCard: json['esports_grade_card'] as dynamic,
|
||||
callbacks: json['callbacks'] as dynamic,
|
||||
contextFeature: json['context_feature'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/reply/folder.dart
Normal file
13
lib/models_new/reply/folder.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class ReplyFolder {
|
||||
bool? hasFolded;
|
||||
bool? isFolded;
|
||||
String? rule;
|
||||
|
||||
ReplyFolder({this.hasFolded, this.isFolded, this.rule});
|
||||
|
||||
factory ReplyFolder.fromJson(Map<String, dynamic> json) => ReplyFolder(
|
||||
hasFolded: json['has_folded'] as bool?,
|
||||
isFolded: json['is_folded'] as bool?,
|
||||
rule: json['rule'] as String?,
|
||||
);
|
||||
}
|
||||
20
lib/models_new/reply/level_info.dart
Normal file
20
lib/models_new/reply/level_info.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class LevelInfo {
|
||||
int? currentLevel;
|
||||
int? currentMin;
|
||||
int? currentExp;
|
||||
int? nextExp;
|
||||
|
||||
LevelInfo({
|
||||
this.currentLevel,
|
||||
this.currentMin,
|
||||
this.currentExp,
|
||||
this.nextExp,
|
||||
});
|
||||
|
||||
factory LevelInfo.fromJson(Map<String, dynamic> 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 int?,
|
||||
);
|
||||
}
|
||||
81
lib/models_new/reply/member.dart
Normal file
81
lib/models_new/reply/member.dart
Normal file
@@ -0,0 +1,81 @@
|
||||
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';
|
||||
|
||||
class ReplyMember {
|
||||
String? mid;
|
||||
String? uname;
|
||||
String? sex;
|
||||
String? sign;
|
||||
String? avatar;
|
||||
String? rank;
|
||||
int? faceNftNew;
|
||||
int? isSeniorMember;
|
||||
Senior? senior;
|
||||
LevelInfo? levelInfo;
|
||||
Pendant? pendant;
|
||||
Nameplate? nameplate;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
dynamic fansDetail;
|
||||
bool? isContractor;
|
||||
String? contractDesc;
|
||||
dynamic nftInteraction;
|
||||
|
||||
ReplyMember({
|
||||
this.mid,
|
||||
this.uname,
|
||||
this.sex,
|
||||
this.sign,
|
||||
this.avatar,
|
||||
this.rank,
|
||||
this.faceNftNew,
|
||||
this.isSeniorMember,
|
||||
this.senior,
|
||||
this.levelInfo,
|
||||
this.pendant,
|
||||
this.nameplate,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.fansDetail,
|
||||
this.isContractor,
|
||||
this.contractDesc,
|
||||
this.nftInteraction,
|
||||
});
|
||||
|
||||
factory ReplyMember.fromJson(Map<String, dynamic> json) => ReplyMember(
|
||||
mid: json['mid'] as String?,
|
||||
uname: json['uname'] as String?,
|
||||
sex: json['sex'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
rank: json['rank'] as String?,
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
isSeniorMember: json['is_senior_member'] as int?,
|
||||
senior: json['senior'] == null
|
||||
? null
|
||||
: Senior.fromJson(json['senior'] as Map<String, dynamic>),
|
||||
levelInfo: json['level_info'] == null
|
||||
? null
|
||||
: LevelInfo.fromJson(json['level_info'] as Map<String, dynamic>),
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
nameplate: json['nameplate'] == null
|
||||
? null
|
||||
: Nameplate.fromJson(json['nameplate'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
fansDetail: json['fans_detail'] as dynamic,
|
||||
isContractor: json['is_contractor'] as bool?,
|
||||
contractDesc: json['contract_desc'] as String?,
|
||||
nftInteraction: json['nft_interaction'] as dynamic,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/reply/nameplate.dart
Normal file
26
lib/models_new/reply/nameplate.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
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<String, dynamic> 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?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/reply/pagination_reply.dart
Normal file
11
lib/models_new/reply/pagination_reply.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class PaginationReply {
|
||||
String? nextOffset;
|
||||
|
||||
PaginationReply({this.nextOffset});
|
||||
|
||||
factory PaginationReply.fromJson(Map<String, dynamic> json) {
|
||||
return PaginationReply(
|
||||
nextOffset: json['next_offset'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
26
lib/models_new/reply/picture.dart
Normal file
26
lib/models_new/reply/picture.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class ReplyPicture {
|
||||
String? imgSrc;
|
||||
int? imgWidth;
|
||||
int? imgHeight;
|
||||
double? imgSize;
|
||||
String? topRightIcon;
|
||||
bool? playGifThumbnail;
|
||||
|
||||
ReplyPicture({
|
||||
this.imgSrc,
|
||||
this.imgWidth,
|
||||
this.imgHeight,
|
||||
this.imgSize,
|
||||
this.topRightIcon,
|
||||
this.playGifThumbnail,
|
||||
});
|
||||
|
||||
factory ReplyPicture.fromJson(Map<String, dynamic> json) => ReplyPicture(
|
||||
imgSrc: json['img_src'] as String?,
|
||||
imgWidth: json['img_width'] as int?,
|
||||
imgHeight: json['img_height'] as int?,
|
||||
imgSize: (json['img_size'] as num?)?.toDouble(),
|
||||
topRightIcon: json['top_right_icon'] as String?,
|
||||
playGifThumbnail: json['play_gif_thumbnail'] as bool?,
|
||||
);
|
||||
}
|
||||
126
lib/models_new/reply/reply.dart
Normal file
126
lib/models_new/reply/reply.dart
Normal file
@@ -0,0 +1,126 @@
|
||||
import 'package:PiliPlus/models_new/reply/content.dart';
|
||||
import 'package:PiliPlus/models_new/reply/folder.dart';
|
||||
import 'package:PiliPlus/models_new/reply/member.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply_control.dart';
|
||||
import 'package:PiliPlus/models_new/reply/up_action.dart';
|
||||
|
||||
class ReplyItemModel {
|
||||
int? rpid;
|
||||
int? oid;
|
||||
int? type;
|
||||
int? mid;
|
||||
int? root;
|
||||
int? parent;
|
||||
int? dialog;
|
||||
int? count;
|
||||
int? rcount;
|
||||
int? state;
|
||||
int? fansgrade;
|
||||
int? attr;
|
||||
int? ctime;
|
||||
String? midStr;
|
||||
String? oidStr;
|
||||
String? rpidStr;
|
||||
String? rootStr;
|
||||
String? parentStr;
|
||||
String? dialogStr;
|
||||
int? like;
|
||||
int? action;
|
||||
ReplyMember? member;
|
||||
ReplyContent? content;
|
||||
List<ReplyItemModel>? replies;
|
||||
int? assist;
|
||||
UpAction? upAction;
|
||||
bool? invisible;
|
||||
ReplyControl? replyControl;
|
||||
ReplyFolder? folder;
|
||||
int? dynamicId;
|
||||
String? dynamicIdStr;
|
||||
String? noteCvidStr;
|
||||
String? trackInfo;
|
||||
|
||||
ReplyItemModel({
|
||||
this.rpid,
|
||||
this.oid,
|
||||
this.type,
|
||||
this.mid,
|
||||
this.root,
|
||||
this.parent,
|
||||
this.dialog,
|
||||
this.count,
|
||||
this.rcount,
|
||||
this.state,
|
||||
this.fansgrade,
|
||||
this.attr,
|
||||
this.ctime,
|
||||
this.midStr,
|
||||
this.oidStr,
|
||||
this.rpidStr,
|
||||
this.rootStr,
|
||||
this.parentStr,
|
||||
this.dialogStr,
|
||||
this.like,
|
||||
this.action,
|
||||
this.member,
|
||||
this.content,
|
||||
this.replies,
|
||||
this.assist,
|
||||
this.upAction,
|
||||
this.invisible,
|
||||
this.replyControl,
|
||||
this.folder,
|
||||
this.dynamicId,
|
||||
this.dynamicIdStr,
|
||||
this.noteCvidStr,
|
||||
this.trackInfo,
|
||||
});
|
||||
|
||||
factory ReplyItemModel.fromJson(Map<String, dynamic> json) => ReplyItemModel(
|
||||
rpid: json['rpid'] as int?,
|
||||
oid: json['oid'] as int?,
|
||||
type: json['type'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
root: json['root'] as int?,
|
||||
parent: json['parent'] as int?,
|
||||
dialog: json['dialog'] as int?,
|
||||
count: json['count'] as int?,
|
||||
rcount: json['rcount'] as int?,
|
||||
state: json['state'] as int?,
|
||||
fansgrade: json['fansgrade'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
midStr: json['mid_str'] as String?,
|
||||
oidStr: json['oid_str'] as String?,
|
||||
rpidStr: json['rpid_str'] as String?,
|
||||
rootStr: json['root_str'] as String?,
|
||||
parentStr: json['parent_str'] as String?,
|
||||
dialogStr: json['dialog_str'] as String?,
|
||||
like: json['like'] as int?,
|
||||
action: json['action'] as int?,
|
||||
member: json['member'] == null
|
||||
? null
|
||||
: ReplyMember.fromJson(json['member'] as Map<String, dynamic>),
|
||||
content: json['content'] == null
|
||||
? null
|
||||
: ReplyContent.fromJson(json['content'] as Map<String, dynamic>),
|
||||
replies: (json['replies'] as List<dynamic>?)
|
||||
?.map((e) => ReplyItemModel.fromJson(e))
|
||||
.toList(),
|
||||
assist: json['assist'] as int?,
|
||||
upAction: json['up_action'] == null
|
||||
? null
|
||||
: UpAction.fromJson(json['up_action'] as Map<String, dynamic>),
|
||||
invisible: json['invisible'] as bool?,
|
||||
replyControl: json['reply_control'] == null
|
||||
? null
|
||||
: ReplyControl.fromJson(
|
||||
json['reply_control'] as Map<String, dynamic>),
|
||||
folder: json['folder'] == null
|
||||
? null
|
||||
: ReplyFolder.fromJson(json['folder'] as Map<String, dynamic>),
|
||||
dynamicId: json['dynamic_id'] as int?,
|
||||
dynamicIdStr: json['dynamic_id_str'] as String?,
|
||||
noteCvidStr: json['note_cvid_str'] as String?,
|
||||
trackInfo: json['track_info'] as String?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/reply/reply_control.dart
Normal file
26
lib/models_new/reply/reply_control.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class ReplyControl {
|
||||
int? maxLine;
|
||||
String? timeDesc;
|
||||
String? bizScene;
|
||||
String? location;
|
||||
bool? isNoteV2;
|
||||
int? translationSwitch;
|
||||
|
||||
ReplyControl({
|
||||
this.maxLine,
|
||||
this.timeDesc,
|
||||
this.bizScene,
|
||||
this.location,
|
||||
this.isNoteV2,
|
||||
this.translationSwitch,
|
||||
});
|
||||
|
||||
factory ReplyControl.fromJson(Map<String, dynamic> json) => ReplyControl(
|
||||
maxLine: json['max_line'] as int?,
|
||||
timeDesc: json['time_desc'] as String?,
|
||||
bizScene: json['biz_scene'] as String?,
|
||||
location: json['location'] as String?,
|
||||
isNoteV2: json['is_note_v2'] as bool?,
|
||||
translationSwitch: json['translation_switch'] as int?,
|
||||
);
|
||||
}
|
||||
9
lib/models_new/reply/senior.dart
Normal file
9
lib/models_new/reply/senior.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Senior {
|
||||
int? status;
|
||||
|
||||
Senior({this.status});
|
||||
|
||||
factory Senior.fromJson(Map<String, dynamic> json) => Senior(
|
||||
status: json['status'] as int?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/reply/top.dart
Normal file
17
lib/models_new/reply/top.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/reply/upper.dart';
|
||||
|
||||
class Top {
|
||||
dynamic admin;
|
||||
Upper? upper;
|
||||
dynamic vote;
|
||||
|
||||
Top({this.admin, this.upper, this.vote});
|
||||
|
||||
factory Top.fromJson(Map<String, dynamic> json) => Top(
|
||||
admin: json['admin'] as dynamic,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
vote: json['vote'] as dynamic,
|
||||
);
|
||||
}
|
||||
124
lib/models_new/reply/top_reply.dart
Normal file
124
lib/models_new/reply/top_reply.dart
Normal file
@@ -0,0 +1,124 @@
|
||||
import 'package:PiliPlus/models_new/reply/content.dart';
|
||||
import 'package:PiliPlus/models_new/reply/folder.dart';
|
||||
import 'package:PiliPlus/models_new/reply/member.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply_control.dart';
|
||||
import 'package:PiliPlus/models_new/reply/up_action.dart';
|
||||
|
||||
class TopReply {
|
||||
int? rpid;
|
||||
int? oid;
|
||||
int? type;
|
||||
int? mid;
|
||||
int? root;
|
||||
int? parent;
|
||||
int? dialog;
|
||||
int? count;
|
||||
int? rcount;
|
||||
int? state;
|
||||
int? fansgrade;
|
||||
int? attr;
|
||||
int? ctime;
|
||||
String? midStr;
|
||||
String? oidStr;
|
||||
String? rpidStr;
|
||||
String? rootStr;
|
||||
String? parentStr;
|
||||
String? dialogStr;
|
||||
int? like;
|
||||
int? action;
|
||||
ReplyMember? member;
|
||||
ReplyContent? content;
|
||||
List<ReplyItemModel>? replies;
|
||||
int? assist;
|
||||
UpAction? upAction;
|
||||
bool? invisible;
|
||||
ReplyControl? replyControl;
|
||||
ReplyFolder? folder;
|
||||
String? dynamicIdStr;
|
||||
String? noteCvidStr;
|
||||
String? trackInfo;
|
||||
|
||||
TopReply({
|
||||
this.rpid,
|
||||
this.oid,
|
||||
this.type,
|
||||
this.mid,
|
||||
this.root,
|
||||
this.parent,
|
||||
this.dialog,
|
||||
this.count,
|
||||
this.rcount,
|
||||
this.state,
|
||||
this.fansgrade,
|
||||
this.attr,
|
||||
this.ctime,
|
||||
this.midStr,
|
||||
this.oidStr,
|
||||
this.rpidStr,
|
||||
this.rootStr,
|
||||
this.parentStr,
|
||||
this.dialogStr,
|
||||
this.like,
|
||||
this.action,
|
||||
this.member,
|
||||
this.content,
|
||||
this.replies,
|
||||
this.assist,
|
||||
this.upAction,
|
||||
this.invisible,
|
||||
this.replyControl,
|
||||
this.folder,
|
||||
this.dynamicIdStr,
|
||||
this.noteCvidStr,
|
||||
this.trackInfo,
|
||||
});
|
||||
|
||||
factory TopReply.fromJson(Map<String, dynamic> json) => TopReply(
|
||||
rpid: json['rpid'] as int?,
|
||||
oid: json['oid'] as int?,
|
||||
type: json['type'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
root: json['root'] as int?,
|
||||
parent: json['parent'] as int?,
|
||||
dialog: json['dialog'] as int?,
|
||||
count: json['count'] as int?,
|
||||
rcount: json['rcount'] as int?,
|
||||
state: json['state'] as int?,
|
||||
fansgrade: json['fansgrade'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
midStr: json['mid_str'] as String?,
|
||||
oidStr: json['oid_str'] as String?,
|
||||
rpidStr: json['rpid_str'] as String?,
|
||||
rootStr: json['root_str'] as String?,
|
||||
parentStr: json['parent_str'] as String?,
|
||||
dialogStr: json['dialog_str'] as String?,
|
||||
like: json['like'] as int?,
|
||||
action: json['action'] as int?,
|
||||
member: json['member'] == null
|
||||
? null
|
||||
: ReplyMember.fromJson(json['member'] as Map<String, dynamic>),
|
||||
content: json['content'] == null
|
||||
? null
|
||||
: ReplyContent.fromJson(json['content'] as Map<String, dynamic>),
|
||||
replies: (json['replies'] as List<dynamic>?)
|
||||
?.map((e) => ReplyItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
assist: json['assist'] as int?,
|
||||
upAction: json['up_action'] == null
|
||||
? null
|
||||
: UpAction.fromJson(json['up_action'] as Map<String, dynamic>),
|
||||
invisible: json['invisible'] as bool?,
|
||||
replyControl: json['reply_control'] == null
|
||||
? null
|
||||
: ReplyControl.fromJson(
|
||||
json['reply_control'] as Map<String, dynamic>),
|
||||
folder: json['folder'] == null
|
||||
? null
|
||||
: ReplyFolder.fromJson(json['folder'] as Map<String, dynamic>),
|
||||
dynamicIdStr: json['dynamic_id_str'] as String?,
|
||||
noteCvidStr: json['note_cvid_str'] as String?,
|
||||
trackInfo: json['track_info'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/reply/up_action.dart
Normal file
11
lib/models_new/reply/up_action.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class UpAction {
|
||||
bool? like;
|
||||
bool? reply;
|
||||
|
||||
UpAction({this.like, this.reply});
|
||||
|
||||
factory UpAction.fromJson(Map<String, dynamic> json) => UpAction(
|
||||
like: json['like'] as bool?,
|
||||
reply: json['reply'] as bool?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/reply/up_selection.dart
Normal file
11
lib/models_new/reply/up_selection.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class UpSelection {
|
||||
int? pendingCount;
|
||||
int? ignoreCount;
|
||||
|
||||
UpSelection({this.pendingCount, this.ignoreCount});
|
||||
|
||||
factory UpSelection.fromJson(Map<String, dynamic> json) => UpSelection(
|
||||
pendingCount: json['pending_count'] as int?,
|
||||
ignoreCount: json['ignore_count'] as int?,
|
||||
);
|
||||
}
|
||||
124
lib/models_new/reply/upper.dart
Normal file
124
lib/models_new/reply/upper.dart
Normal file
@@ -0,0 +1,124 @@
|
||||
import 'package:PiliPlus/models_new/reply/content.dart';
|
||||
import 'package:PiliPlus/models_new/reply/folder.dart';
|
||||
import 'package:PiliPlus/models_new/reply/member.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply.dart';
|
||||
import 'package:PiliPlus/models_new/reply/reply_control.dart';
|
||||
import 'package:PiliPlus/models_new/reply/up_action.dart';
|
||||
|
||||
class Upper {
|
||||
int? rpid;
|
||||
int? oid;
|
||||
int? type;
|
||||
int? mid;
|
||||
int? root;
|
||||
int? parent;
|
||||
int? dialog;
|
||||
int? count;
|
||||
int? rcount;
|
||||
int? state;
|
||||
int? fansgrade;
|
||||
int? attr;
|
||||
int? ctime;
|
||||
String? midStr;
|
||||
String? oidStr;
|
||||
String? rpidStr;
|
||||
String? rootStr;
|
||||
String? parentStr;
|
||||
String? dialogStr;
|
||||
int? like;
|
||||
int? action;
|
||||
ReplyMember? member;
|
||||
ReplyContent? content;
|
||||
List<ReplyItemModel>? replies;
|
||||
int? assist;
|
||||
UpAction? upAction;
|
||||
bool? invisible;
|
||||
ReplyControl? replyControl;
|
||||
ReplyFolder? folder;
|
||||
String? dynamicIdStr;
|
||||
String? noteCvidStr;
|
||||
String? trackInfo;
|
||||
|
||||
Upper({
|
||||
this.rpid,
|
||||
this.oid,
|
||||
this.type,
|
||||
this.mid,
|
||||
this.root,
|
||||
this.parent,
|
||||
this.dialog,
|
||||
this.count,
|
||||
this.rcount,
|
||||
this.state,
|
||||
this.fansgrade,
|
||||
this.attr,
|
||||
this.ctime,
|
||||
this.midStr,
|
||||
this.oidStr,
|
||||
this.rpidStr,
|
||||
this.rootStr,
|
||||
this.parentStr,
|
||||
this.dialogStr,
|
||||
this.like,
|
||||
this.action,
|
||||
this.member,
|
||||
this.content,
|
||||
this.replies,
|
||||
this.assist,
|
||||
this.upAction,
|
||||
this.invisible,
|
||||
this.replyControl,
|
||||
this.folder,
|
||||
this.dynamicIdStr,
|
||||
this.noteCvidStr,
|
||||
this.trackInfo,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
rpid: json['rpid'] as int?,
|
||||
oid: json['oid'] as int?,
|
||||
type: json['type'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
root: json['root'] as int?,
|
||||
parent: json['parent'] as int?,
|
||||
dialog: json['dialog'] as int?,
|
||||
count: json['count'] as int?,
|
||||
rcount: json['rcount'] as int?,
|
||||
state: json['state'] as int?,
|
||||
fansgrade: json['fansgrade'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
midStr: json['mid_str'] as String?,
|
||||
oidStr: json['oid_str'] as String?,
|
||||
rpidStr: json['rpid_str'] as String?,
|
||||
rootStr: json['root_str'] as String?,
|
||||
parentStr: json['parent_str'] as String?,
|
||||
dialogStr: json['dialog_str'] as String?,
|
||||
like: json['like'] as int?,
|
||||
action: json['action'] as int?,
|
||||
member: json['member'] == null
|
||||
? null
|
||||
: ReplyMember.fromJson(json['member'] as Map<String, dynamic>),
|
||||
content: json['content'] == null
|
||||
? null
|
||||
: ReplyContent.fromJson(json['content'] as Map<String, dynamic>),
|
||||
replies: (json['replies'] as List<dynamic>?)
|
||||
?.map((e) => ReplyItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
assist: json['assist'] as int?,
|
||||
upAction: json['up_action'] == null
|
||||
? null
|
||||
: UpAction.fromJson(json['up_action'] as Map<String, dynamic>),
|
||||
invisible: json['invisible'] as bool?,
|
||||
replyControl: json['reply_control'] == null
|
||||
? null
|
||||
: ReplyControl.fromJson(
|
||||
json['reply_control'] as Map<String, dynamic>),
|
||||
folder: json['folder'] == null
|
||||
? null
|
||||
: ReplyFolder.fromJson(json['folder'] as Map<String, dynamic>),
|
||||
dynamicIdStr: json['dynamic_id_str'] as String?,
|
||||
noteCvidStr: json['note_cvid_str'] as String?,
|
||||
trackInfo: json['track_info'] as String?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user