mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 12:07:11 +08:00
79
lib/models_new/msg/msg_reply/content.dart
Normal file
79
lib/models_new/msg/msg_reply/content.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
class MsgReplyContent {
|
||||
int? subjectId;
|
||||
int? rootId;
|
||||
int? sourceId;
|
||||
int? targetId;
|
||||
String? type;
|
||||
int? businessId;
|
||||
String? business;
|
||||
String? title;
|
||||
String? desc;
|
||||
String? image;
|
||||
String? uri;
|
||||
String? nativeUri;
|
||||
String? detailTitle;
|
||||
String? rootReplyContent;
|
||||
String? sourceContent;
|
||||
String? targetReplyContent;
|
||||
List<dynamic>? atDetails;
|
||||
List<dynamic>? topicDetails;
|
||||
bool? hideReplyButton;
|
||||
bool? hideLikeButton;
|
||||
int? likeState;
|
||||
dynamic danmu;
|
||||
String? message;
|
||||
|
||||
MsgReplyContent({
|
||||
this.subjectId,
|
||||
this.rootId,
|
||||
this.sourceId,
|
||||
this.targetId,
|
||||
this.type,
|
||||
this.businessId,
|
||||
this.business,
|
||||
this.title,
|
||||
this.desc,
|
||||
this.image,
|
||||
this.uri,
|
||||
this.nativeUri,
|
||||
this.detailTitle,
|
||||
this.rootReplyContent,
|
||||
this.sourceContent,
|
||||
this.targetReplyContent,
|
||||
this.atDetails,
|
||||
this.topicDetails,
|
||||
this.hideReplyButton,
|
||||
this.hideLikeButton,
|
||||
this.likeState,
|
||||
this.danmu,
|
||||
this.message,
|
||||
});
|
||||
|
||||
factory MsgReplyContent.fromJson(Map<String, dynamic> json) {
|
||||
return MsgReplyContent(
|
||||
subjectId: json['subject_id'] as int?,
|
||||
rootId: json['root_id'] as int?,
|
||||
sourceId: json['source_id'] as int?,
|
||||
targetId: json['target_id'] as int?,
|
||||
type: json['type'] as String?,
|
||||
businessId: json['business_id'] as int?,
|
||||
business: json['business'] as String?,
|
||||
title: json['title'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
image: json['image'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
nativeUri: json['native_uri'] as String?,
|
||||
detailTitle: json['detail_title'] as String?,
|
||||
rootReplyContent: json['root_reply_content'] as String?,
|
||||
sourceContent: json['source_content'] as String?,
|
||||
targetReplyContent: json['target_reply_content'] as String?,
|
||||
atDetails: json['at_details'] as List<dynamic>?,
|
||||
topicDetails: json['topic_details'] as List<dynamic>?,
|
||||
hideReplyButton: json['hide_reply_button'] as bool?,
|
||||
hideLikeButton: json['hide_like_button'] as bool?,
|
||||
likeState: json['like_state'] as int?,
|
||||
danmu: json['danmu'] as dynamic,
|
||||
message: json['message'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
13
lib/models_new/msg/msg_reply/cursor.dart
Normal file
13
lib/models_new/msg/msg_reply/cursor.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Cursor {
|
||||
bool? isEnd;
|
||||
int? id;
|
||||
int? time;
|
||||
|
||||
Cursor({this.isEnd, this.id, this.time});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
isEnd: json['is_end'] as bool?,
|
||||
id: json['id'] as int?,
|
||||
time: json['time'] as int?,
|
||||
);
|
||||
}
|
||||
20
lib/models_new/msg/msg_reply/data.dart
Normal file
20
lib/models_new/msg/msg_reply/data.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/cursor.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/item.dart';
|
||||
|
||||
class MsgReplyData {
|
||||
Cursor? cursor;
|
||||
List<MsgReplyItem>? items;
|
||||
int? lastViewAt;
|
||||
|
||||
MsgReplyData({this.cursor, this.items, this.lastViewAt});
|
||||
|
||||
factory MsgReplyData.fromJson(Map<String, dynamic> json) => MsgReplyData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgReplyItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
}
|
||||
34
lib/models_new/msg/msg_reply/item.dart
Normal file
34
lib/models_new/msg/msg_reply/item.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/content.dart';
|
||||
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/user.dart';
|
||||
|
||||
class MsgReplyItem {
|
||||
int? id;
|
||||
User? user;
|
||||
MsgReplyContent? item;
|
||||
int? counts;
|
||||
int? isMulti;
|
||||
int? replyTime;
|
||||
|
||||
MsgReplyItem({
|
||||
this.id,
|
||||
this.user,
|
||||
this.item,
|
||||
this.counts,
|
||||
this.isMulti,
|
||||
this.replyTime,
|
||||
});
|
||||
|
||||
factory MsgReplyItem.fromJson(Map<String, dynamic> json) => MsgReplyItem(
|
||||
id: json['id'] as int?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgReplyContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
isMulti: json['is_multi'] as int?,
|
||||
replyTime: json['reply_time'] as int?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/msg/msg_reply/user.dart
Normal file
26
lib/models_new/msg/msg_reply/user.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class User {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
User({
|
||||
this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow,
|
||||
});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => User(
|
||||
mid: json['mid'] as int?,
|
||||
fans: json['fans'] as int?,
|
||||
nickname: json['nickname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
midLink: json['mid_link'] as String?,
|
||||
follow: json['follow'] as bool?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user