mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 19:51:11 +08:00
23
lib/models_new/dynamic/dyn_reserve/data.dart
Normal file
23
lib/models_new/dynamic/dyn_reserve/data.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class DynReserveData {
|
||||
int? finalBtnStatus;
|
||||
int? btnMode;
|
||||
int? reserveUpdate;
|
||||
String? descUpdate;
|
||||
String? toast;
|
||||
|
||||
DynReserveData({
|
||||
this.finalBtnStatus,
|
||||
this.btnMode,
|
||||
this.reserveUpdate,
|
||||
this.descUpdate,
|
||||
this.toast,
|
||||
});
|
||||
|
||||
factory DynReserveData.fromJson(Map<String, dynamic> json) => DynReserveData(
|
||||
finalBtnStatus: json['final_btn_status'] as int?,
|
||||
btnMode: json['btn_mode'] as int?,
|
||||
reserveUpdate: json['reserve_update'] as int?,
|
||||
descUpdate: json['desc_update'] as String?,
|
||||
toast: json['toast'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/dynamic/dyn_topic_feed/all_sort_by.dart
Normal file
11
lib/models_new/dynamic/dyn_topic_feed/all_sort_by.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class AllSortBy {
|
||||
int? sortBy;
|
||||
String? sortName;
|
||||
|
||||
AllSortBy({this.sortBy, this.sortName});
|
||||
|
||||
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
||||
sortBy: json['sort_by'] as int?,
|
||||
sortName: json['sort_name'] as String?,
|
||||
);
|
||||
}
|
||||
16
lib/models_new/dynamic/dyn_topic_feed/item.dart
Normal file
16
lib/models_new/dynamic/dyn_topic_feed/item.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
|
||||
class TopicCardItem {
|
||||
DynamicItemModel? dynamicCardItem;
|
||||
String? topicType;
|
||||
|
||||
TopicCardItem({this.dynamicCardItem, this.topicType});
|
||||
|
||||
factory TopicCardItem.fromJson(Map<String, dynamic> json) => TopicCardItem(
|
||||
dynamicCardItem: json['dynamic_card_item'] == null
|
||||
? null
|
||||
: DynamicItemModel.fromJson(
|
||||
json['dynamic_card_item'] as Map<String, dynamic>),
|
||||
topicType: json['topic_type'] as String?,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/dynamic/dyn_topic_feed/topic_card_list.dart
Normal file
28
lib/models_new/dynamic/dyn_topic_feed/topic_card_list.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/item.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/topic_sort_by_conf.dart';
|
||||
|
||||
class TopicCardList {
|
||||
bool? hasMore;
|
||||
List<TopicCardItem>? items;
|
||||
String? offset;
|
||||
TopicSortByConf? topicSortByConf;
|
||||
|
||||
TopicCardList({
|
||||
this.hasMore,
|
||||
this.items,
|
||||
this.offset,
|
||||
this.topicSortByConf,
|
||||
});
|
||||
|
||||
factory TopicCardList.fromJson(Map<String, dynamic> json) => TopicCardList(
|
||||
hasMore: json['has_more'] as bool?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => TopicCardItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
topicSortByConf: json['topic_sort_by_conf'] == null
|
||||
? null
|
||||
: TopicSortByConf.fromJson(
|
||||
json['topic_sort_by_conf'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/all_sort_by.dart';
|
||||
|
||||
class TopicSortByConf {
|
||||
List<AllSortBy>? allSortBy;
|
||||
int? defaultSortBy;
|
||||
int? showSortBy;
|
||||
|
||||
TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy});
|
||||
|
||||
factory TopicSortByConf.fromJson(Map<String, dynamic> json) {
|
||||
return TopicSortByConf(
|
||||
allSortBy: (json['all_sort_by'] as List<dynamic>?)
|
||||
?.map((e) => AllSortBy.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
defaultSortBy: json['default_sort_by'] as int?,
|
||||
showSortBy: json['show_sort_by'] as int?,
|
||||
);
|
||||
}
|
||||
}
|
||||
34
lib/models_new/dynamic/dyn_topic_pub_search/data.dart
Normal file
34
lib/models_new/dynamic/dyn_topic_pub_search/data.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/new_topic.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/page_info.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/topic_item.dart';
|
||||
|
||||
class TopicPubSearchData {
|
||||
NewTopic? newTopic;
|
||||
bool? hasCreateJurisdiction;
|
||||
List<TopicPubSearchItem>? topicItems;
|
||||
String? requestId;
|
||||
PageInfo? pageInfo;
|
||||
|
||||
TopicPubSearchData({
|
||||
this.newTopic,
|
||||
this.hasCreateJurisdiction,
|
||||
this.topicItems,
|
||||
this.requestId,
|
||||
this.pageInfo,
|
||||
});
|
||||
|
||||
factory TopicPubSearchData.fromJson(Map<String, dynamic> json) =>
|
||||
TopicPubSearchData(
|
||||
newTopic: json['new_topic'] == null
|
||||
? null
|
||||
: NewTopic.fromJson(json['new_topic'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
topicItems: (json['topic_items'] as List<dynamic>?)
|
||||
?.map((e) => TopicPubSearchItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
requestId: json['request_id'] as String?,
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class NewTopic {
|
||||
String? name;
|
||||
|
||||
NewTopic({this.name});
|
||||
|
||||
factory NewTopic.fromJson(Map<String, dynamic> json) => NewTopic(
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart
Normal file
11
lib/models_new/dynamic/dyn_topic_pub_search/page_info.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class PageInfo {
|
||||
int? offset;
|
||||
bool? hasMore;
|
||||
|
||||
PageInfo({this.offset, this.hasMore});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
offset: json['offset'] as int?,
|
||||
hasMore: json['has_more'] as bool?,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/dynamic/dyn_topic_pub_search/topic_item.dart
Normal file
30
lib/models_new/dynamic/dyn_topic_pub_search/topic_item.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
class TopicPubSearchItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? statDesc;
|
||||
String? description;
|
||||
bool? showInteractData;
|
||||
|
||||
TopicPubSearchItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.statDesc,
|
||||
this.description,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory TopicPubSearchItem.fromJson(Map<String, dynamic> json) =>
|
||||
TopicPubSearchItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
statDesc: json['stat_desc'] as String?,
|
||||
description: json['description'] as String?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
);
|
||||
}
|
||||
31
lib/models_new/dynamic/dyn_topic_top/top_details.dart
Normal file
31
lib/models_new/dynamic/dyn_topic_top/top_details.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_creator.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_item.dart';
|
||||
|
||||
class TopDetails {
|
||||
TopicItem? topicItem;
|
||||
TopicCreator? topicCreator;
|
||||
bool? hasCreateJurisdiction;
|
||||
int? wordColor;
|
||||
bool? closePubLayerEntry;
|
||||
|
||||
TopDetails({
|
||||
this.topicItem,
|
||||
this.topicCreator,
|
||||
this.hasCreateJurisdiction,
|
||||
this.wordColor,
|
||||
this.closePubLayerEntry,
|
||||
});
|
||||
|
||||
factory TopDetails.fromJson(Map<String, dynamic> json) => TopDetails(
|
||||
topicItem: json['topic_item'] == null
|
||||
? null
|
||||
: TopicItem.fromJson(json['topic_item'] as Map<String, dynamic>),
|
||||
topicCreator: json['topic_creator'] == null
|
||||
? null
|
||||
: TopicCreator.fromJson(
|
||||
json['topic_creator'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
wordColor: json['word_color'] as int?,
|
||||
closePubLayerEntry: json['close_pub_layer_entry'] as bool?,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/dynamic/dyn_topic_top/topic_creator.dart
Normal file
17
lib/models_new/dynamic/dyn_topic_top/topic_creator.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class TopicCreator {
|
||||
int? uid;
|
||||
String? face;
|
||||
String? name;
|
||||
|
||||
TopicCreator({
|
||||
this.uid,
|
||||
this.face,
|
||||
this.name,
|
||||
});
|
||||
|
||||
factory TopicCreator.fromJson(Map<String, dynamic> json) => TopicCreator(
|
||||
uid: json['uid'] as int?,
|
||||
face: json['face'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
56
lib/models_new/dynamic/dyn_topic_top/topic_item.dart
Normal file
56
lib/models_new/dynamic/dyn_topic_top/topic_item.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
class TopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
late int fav;
|
||||
late int like;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
bool? isFav;
|
||||
bool? isLike;
|
||||
|
||||
TopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
required this.fav,
|
||||
required this.like,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
this.isFav,
|
||||
this.isLike,
|
||||
});
|
||||
|
||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int? ?? 0,
|
||||
discuss: json['discuss'] as int? ?? 0,
|
||||
fav: json['fav'] as int? ?? 0,
|
||||
like: json['like'] as int? ?? 0,
|
||||
dynamics: json['dynamics'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
backColor: json['back_color'] as String?,
|
||||
description: json['description'] as String?,
|
||||
sharePic: json['share_pic'] as String?,
|
||||
shareUrl: json['share_url'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
isFav: json['is_fav'] as bool?,
|
||||
isLike: json['is_like'] as bool?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user