mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
15
lib/models_new/bubble/base_info.dart
Normal file
15
lib/models_new/bubble/base_info.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/bubble/tribee_info.dart';
|
||||
|
||||
class BaseInfo {
|
||||
TribeInfo? tribeInfo;
|
||||
bool? isJoined;
|
||||
|
||||
BaseInfo({this.tribeInfo, this.isJoined});
|
||||
|
||||
factory BaseInfo.fromJson(Map<String, dynamic> json) => BaseInfo(
|
||||
tribeInfo: json['tribee_info'] == null
|
||||
? null
|
||||
: TribeInfo.fromJson(json['tribee_info'] as Map<String, dynamic>),
|
||||
isJoined: json['is_joined'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/bubble/basic_info.dart
Normal file
13
lib/models_new/bubble/basic_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class BasicInfo {
|
||||
String? icon;
|
||||
String? title;
|
||||
String? jumpUri;
|
||||
|
||||
BasicInfo({this.icon, this.title, this.jumpUri});
|
||||
|
||||
factory BasicInfo.fromJson(Map<String, dynamic> json) => BasicInfo(
|
||||
icon: json['icon'] as String?,
|
||||
title: json['title'] as String?,
|
||||
jumpUri: json['jump_uri'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/bubble/category.dart
Normal file
13
lib/models_new/bubble/category.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/bubble/category_list.dart';
|
||||
|
||||
class Category {
|
||||
List<CategoryList>? categoryList;
|
||||
|
||||
Category({this.categoryList});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
categoryList: (json['category_list'] as List<dynamic>?)
|
||||
?.map((e) => CategoryList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/bubble/category_list.dart
Normal file
13
lib/models_new/bubble/category_list.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class CategoryList {
|
||||
String? id;
|
||||
String? name;
|
||||
int? type;
|
||||
|
||||
CategoryList({this.id, this.name, this.type});
|
||||
|
||||
factory CategoryList.fromJson(Map<String, dynamic> json) => CategoryList(
|
||||
id: json['id'] as String?,
|
||||
name: json['name'] as String?,
|
||||
type: json['type'] as int?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/bubble/content.dart
Normal file
15
lib/models_new/bubble/content.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/bubble/dyn_list.dart';
|
||||
|
||||
class Content {
|
||||
String? count;
|
||||
List<DynList>? dynList;
|
||||
|
||||
Content({this.count, this.dynList});
|
||||
|
||||
factory Content.fromJson(Map<String, dynamic> json) => Content(
|
||||
count: json['count'] as String?,
|
||||
dynList: (json['dyn_list'] as List<dynamic>?)
|
||||
?.map((e) => DynList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
33
lib/models_new/bubble/data.dart
Normal file
33
lib/models_new/bubble/data.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/bubble/base_info.dart';
|
||||
import 'package:PiliPlus/models_new/bubble/category.dart';
|
||||
import 'package:PiliPlus/models_new/bubble/content.dart';
|
||||
import 'package:PiliPlus/models_new/bubble/sort_info.dart';
|
||||
|
||||
class BubbleData {
|
||||
BaseInfo? baseInfo;
|
||||
Content? content;
|
||||
Category? category;
|
||||
SortInfo? sortInfo;
|
||||
|
||||
BubbleData({
|
||||
this.baseInfo,
|
||||
this.content,
|
||||
this.category,
|
||||
this.sortInfo,
|
||||
});
|
||||
|
||||
factory BubbleData.fromJson(Map<String, dynamic> json) => BubbleData(
|
||||
baseInfo: json['base_info'] == null
|
||||
? null
|
||||
: BaseInfo.fromJson(json['base_info'] as Map<String, dynamic>),
|
||||
content: json['content'] == null
|
||||
? null
|
||||
: Content.fromJson(json['content'] as Map<String, dynamic>),
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
sortInfo: json['sort_info'] == null
|
||||
? null
|
||||
: SortInfo.fromJson(json['sort_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
21
lib/models_new/bubble/dyn_list.dart
Normal file
21
lib/models_new/bubble/dyn_list.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/bubble/meta.dart';
|
||||
|
||||
class DynList {
|
||||
String? dynId;
|
||||
String? title;
|
||||
Meta? meta;
|
||||
|
||||
DynList({
|
||||
this.dynId,
|
||||
this.title,
|
||||
this.meta,
|
||||
});
|
||||
|
||||
factory DynList.fromJson(Map<String, dynamic> json) => DynList(
|
||||
dynId: json['dyn_id'] as String?,
|
||||
title: json['title'] as String?,
|
||||
meta: json['meta'] == null
|
||||
? null
|
||||
: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
20
lib/models_new/bubble/meta.dart
Normal file
20
lib/models_new/bubble/meta.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class Meta {
|
||||
String? author;
|
||||
String? timeText;
|
||||
String? replyCount;
|
||||
String? viewStat;
|
||||
|
||||
Meta({
|
||||
this.author,
|
||||
this.timeText,
|
||||
this.replyCount,
|
||||
this.viewStat,
|
||||
});
|
||||
|
||||
factory Meta.fromJson(Map<String, dynamic> json) => Meta(
|
||||
author: json['author'] as String?,
|
||||
timeText: json['time_text'] as String?,
|
||||
replyCount: json['reply_count'] as String?,
|
||||
viewStat: json['view_stat'] as String?,
|
||||
);
|
||||
}
|
||||
21
lib/models_new/bubble/sort_info.dart
Normal file
21
lib/models_new/bubble/sort_info.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/bubble/sort_item.dart';
|
||||
|
||||
class SortInfo {
|
||||
bool? showSort;
|
||||
List<SortItem>? sortItems;
|
||||
int? curSortType;
|
||||
|
||||
SortInfo({
|
||||
this.showSort,
|
||||
this.sortItems,
|
||||
this.curSortType,
|
||||
});
|
||||
|
||||
factory SortInfo.fromJson(Map<String, dynamic> json) => SortInfo(
|
||||
showSort: json['show_sort'] as bool?,
|
||||
sortItems: (json['sort_items'] as List<dynamic>?)
|
||||
?.map((e) => SortItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
curSortType: json['cur_sort_type'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/bubble/sort_item.dart
Normal file
11
lib/models_new/bubble/sort_item.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class SortItem {
|
||||
int? sortType;
|
||||
String? text;
|
||||
|
||||
SortItem({this.sortType, this.text});
|
||||
|
||||
factory SortItem.fromJson(Map<String, dynamic> json) => SortItem(
|
||||
sortType: json['sort_type'] as int?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/bubble/tribee_info.dart
Normal file
26
lib/models_new/bubble/tribee_info.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class TribeInfo {
|
||||
String? id;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
String? faceUrl;
|
||||
String? jumpUri;
|
||||
String? summary;
|
||||
|
||||
TribeInfo({
|
||||
this.id,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.faceUrl,
|
||||
this.jumpUri,
|
||||
this.summary,
|
||||
});
|
||||
|
||||
factory TribeInfo.fromJson(Map<String, dynamic> json) => TribeInfo(
|
||||
id: json['id'] as String?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
faceUrl: json['face_url'] as String?,
|
||||
jumpUri: json['jump_uri'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user