mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-20 00:56:31 +08:00
refa query follow up
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
class FollowUpModel {
|
||||
FollowUpModel({
|
||||
this.liveUsers,
|
||||
this.upList,
|
||||
required this.upList,
|
||||
});
|
||||
|
||||
String? errMsg;
|
||||
LiveUsers? liveUsers;
|
||||
List<UpItem>? upList;
|
||||
late List<UpItem> upList;
|
||||
|
||||
FollowUpModel.fromJson(Map<String, dynamic> json) {
|
||||
liveUsers = json['live_users'] != null
|
||||
? LiveUsers.fromJson(json['live_users'])
|
||||
: null;
|
||||
upList = (json['up_list'] as List?)
|
||||
?.map<UpItem>((e) => UpItem.fromJson(e))
|
||||
.toList();
|
||||
upList =
|
||||
(json['up_list'] as List?)
|
||||
?.map<UpItem>((e) => UpItem.fromJson(e))
|
||||
.toList() ??
|
||||
<UpItem>[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,54 +39,40 @@ class LiveUsers {
|
||||
}
|
||||
}
|
||||
|
||||
sealed class UserItem {
|
||||
String? face;
|
||||
bool? hasUpdate;
|
||||
late int mid;
|
||||
String? uname;
|
||||
|
||||
UserItem({
|
||||
this.face,
|
||||
this.hasUpdate,
|
||||
int? mid,
|
||||
this.uname,
|
||||
}) : mid = mid ?? -1;
|
||||
}
|
||||
|
||||
class LiveUserItem extends UserItem {
|
||||
class LiveUserItem extends UpItem {
|
||||
bool? isReserveRecall;
|
||||
String? jumpUrl;
|
||||
int? roomId;
|
||||
String? title;
|
||||
|
||||
LiveUserItem.fromJson(Map<String, dynamic> json) {
|
||||
LiveUserItem.fromJson(Map<String, dynamic> json)
|
||||
: super(mid: json['mid'] ?? 0) {
|
||||
face = json['face'];
|
||||
isReserveRecall = json['is_reserve_recall'];
|
||||
jumpUrl = json['jump_url'];
|
||||
mid = json['mid'] ?? -1;
|
||||
roomId = json['room_id'];
|
||||
title = json['title'];
|
||||
uname = json['uname'];
|
||||
hasUpdate = false;
|
||||
}
|
||||
}
|
||||
|
||||
class UpItem extends UserItem {
|
||||
UpItem({
|
||||
super.face,
|
||||
super.hasUpdate,
|
||||
// this.isReserveRecall,
|
||||
super.mid,
|
||||
super.uname,
|
||||
});
|
||||
class UpItem {
|
||||
String? face;
|
||||
bool? hasUpdate;
|
||||
late int mid;
|
||||
String? uname;
|
||||
|
||||
// bool? isReserveRecall;
|
||||
UpItem({
|
||||
this.face,
|
||||
this.hasUpdate,
|
||||
required this.mid,
|
||||
this.uname,
|
||||
});
|
||||
|
||||
UpItem.fromJson(Map<String, dynamic> json) {
|
||||
face = json['face'];
|
||||
hasUpdate = json['has_update'];
|
||||
// isReserveRecall = json['is_reserve_recall'];
|
||||
mid = json['mid'] ?? -1;
|
||||
mid = json['mid'] ?? 0;
|
||||
uname = json['uname'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user