mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
9
lib/models/dynamics/article_opus/attributes.dart
Normal file
9
lib/models/dynamics/article_opus/attributes.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Attributes {
|
||||
String? clazz;
|
||||
|
||||
Attributes({this.clazz});
|
||||
|
||||
factory Attributes.fromJson(Map<String, dynamic> json) => Attributes(
|
||||
clazz: json['class'] as String?,
|
||||
);
|
||||
}
|
||||
92
lib/models/dynamics/article_opus/opus.dart
Normal file
92
lib/models/dynamics/article_opus/opus.dart
Normal file
@@ -0,0 +1,92 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_opus/attributes.dart';
|
||||
|
||||
class ReadOpusModel {
|
||||
dynamic insert;
|
||||
Attributes? attributes;
|
||||
|
||||
ReadOpusModel({this.insert, this.attributes});
|
||||
|
||||
ReadOpusModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['insert'] is Map) {
|
||||
insert = Insert.fromJson(json['insert']);
|
||||
} else {
|
||||
insert = json['insert'];
|
||||
}
|
||||
attributes = json['attributes'] == null
|
||||
? null
|
||||
: Attributes.fromJson(json['attributes'] as Map<String, dynamic>);
|
||||
}
|
||||
}
|
||||
|
||||
class Insert {
|
||||
InsertCard? card;
|
||||
|
||||
Insert({
|
||||
this.card,
|
||||
});
|
||||
|
||||
Insert.fromJson(Map<String, dynamic> json) {
|
||||
if (json['article-card'] != null) {
|
||||
card = InsertCard.fromJson(json['article-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['live-card'] != null) {
|
||||
card = InsertCard.fromJson(json['live-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['goods-card'] != null) {
|
||||
card = InsertCard.fromJson(json['goods-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['video-card'] != null) {
|
||||
card = InsertCard.fromJson(json['video-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['mall-card'] != null) {
|
||||
card = InsertCard.fromJson(json['mall-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['vote-card'] != null) {
|
||||
card = InsertCard.fromJson(json['vote-card']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class InsertCard {
|
||||
dynamic tid;
|
||||
String? id;
|
||||
dynamic alt;
|
||||
String? url;
|
||||
num? width;
|
||||
num? height;
|
||||
num? size;
|
||||
String? status;
|
||||
|
||||
InsertCard({
|
||||
this.tid,
|
||||
this.id,
|
||||
this.alt,
|
||||
this.url,
|
||||
this.width,
|
||||
this.height,
|
||||
this.size,
|
||||
this.status,
|
||||
});
|
||||
|
||||
InsertCard.fromJson(Map<String, dynamic> json) {
|
||||
tid = json['tid'];
|
||||
id = json['id'] == '' ? null : json['id'];
|
||||
alt = json['alt'];
|
||||
url = json['url'];
|
||||
width = json['width'];
|
||||
height = json['height'];
|
||||
size = json['size'];
|
||||
status = json['status'];
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
class AllSortBy {
|
||||
int? sortBy;
|
||||
String? sortName;
|
||||
int? sortBy;
|
||||
String? sortName;
|
||||
|
||||
AllSortBy({this.sortBy, this.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?,
|
||||
);
|
||||
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
||||
sortBy: json['sort_by'] as int?,
|
||||
sortName: json['sort_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'sort_by': sortBy,
|
||||
'sort_name': sortName,
|
||||
};
|
||||
Map<String, dynamic> toJson() => {
|
||||
'sort_by': sortBy,
|
||||
'sort_name': sortName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
class TopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
int? fav;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
int? fav;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
|
||||
TopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.fav,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
});
|
||||
TopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.fav,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
fav: json['fav'] as int?,
|
||||
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?,
|
||||
);
|
||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
fav: json['fav'] as int?,
|
||||
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?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'view': view,
|
||||
'discuss': discuss,
|
||||
'fav': fav,
|
||||
'dynamics': dynamics,
|
||||
'jump_url': jumpUrl,
|
||||
'back_color': backColor,
|
||||
'description': description,
|
||||
'share_pic': sharePic,
|
||||
'share_url': shareUrl,
|
||||
'ctime': ctime,
|
||||
'show_interact_data': showInteractData,
|
||||
};
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'view': view,
|
||||
'discuss': discuss,
|
||||
'fav': fav,
|
||||
'dynamics': dynamics,
|
||||
'jump_url': jumpUrl,
|
||||
'back_color': backColor,
|
||||
'description': description,
|
||||
'share_pic': sharePic,
|
||||
'share_url': shareUrl,
|
||||
'ctime': ctime,
|
||||
'show_interact_data': showInteractData,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user