clean up models

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-05 12:10:18 +08:00
parent b897103af0
commit 279f21857d
308 changed files with 156 additions and 6243 deletions

View File

@@ -4,16 +4,10 @@ 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(
@@ -23,8 +17,5 @@ class TopDetails {
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?,
);
}

View File

@@ -5,14 +5,7 @@ class TopicItem {
int discuss;
int fav;
int like;
int? dynamics;
String? jumpUrl;
String? backColor;
String? description;
String? sharePic;
String? shareUrl;
int? ctime;
bool? showInteractData;
bool? isFav;
bool? isLike;
@@ -23,14 +16,7 @@ class TopicItem {
required 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,
});
@@ -42,14 +28,7 @@ class TopicItem {
discuss: json['discuss'] ?? 0,
fav: json['fav'] ?? 0,
like: json['like'] ?? 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?,
);