mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 12:07:11 +08:00
@@ -34,20 +34,20 @@ class MsgAtContent {
|
||||
});
|
||||
|
||||
factory MsgAtContent.fromJson(Map<String, dynamic> json) => MsgAtContent(
|
||||
type: json['type'] as String?,
|
||||
business: json['business'] as String?,
|
||||
businessId: json['business_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
image: json['image'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
subjectId: json['subject_id'] as int?,
|
||||
rootId: json['root_id'] as int?,
|
||||
targetId: json['target_id'] as int?,
|
||||
sourceId: json['source_id'] as int?,
|
||||
sourceContent: json['source_content'] as String?,
|
||||
nativeUri: json['native_uri'] as String?,
|
||||
atDetails: json['at_details'] as List<dynamic>?,
|
||||
topicDetails: json['topic_details'] as List<dynamic>?,
|
||||
hideReplyButton: json['hide_reply_button'] as bool?,
|
||||
);
|
||||
type: json['type'] as String?,
|
||||
business: json['business'] as String?,
|
||||
businessId: json['business_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
image: json['image'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
subjectId: json['subject_id'] as int?,
|
||||
rootId: json['root_id'] as int?,
|
||||
targetId: json['target_id'] as int?,
|
||||
sourceId: json['source_id'] as int?,
|
||||
sourceContent: json['source_content'] as String?,
|
||||
nativeUri: json['native_uri'] as String?,
|
||||
atDetails: json['at_details'] as List<dynamic>?,
|
||||
topicDetails: json['topic_details'] as List<dynamic>?,
|
||||
hideReplyButton: json['hide_reply_button'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ class Cursor {
|
||||
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?,
|
||||
);
|
||||
isEnd: json['is_end'] as bool?,
|
||||
id: json['id'] as int?,
|
||||
time: json['time'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ class MsgAtData {
|
||||
MsgAtData({this.cursor, this.items});
|
||||
|
||||
factory MsgAtData.fromJson(Map<String, dynamic> json) => MsgAtData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgAtItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgAtItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@ class MsgAtItem {
|
||||
MsgAtItem({this.id, this.user, this.item, this.atTime});
|
||||
|
||||
factory MsgAtItem.fromJson(Map<String, dynamic> json) => MsgAtItem(
|
||||
id: json['id'] as int?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgAtContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
atTime: json['at_time'] as int?,
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgAtContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
atTime: json['at_time'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ class User {
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
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