You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

103 lines
2.6 KiB

class PostData {
List<Records>? records;
int? total;
int? size;
int? current;
int? pages;
PostData({this.records, this.total, this.size, this.current, this.pages});
PostData.fromJson(Map<String, dynamic> json) {
if (json['records'] != null) {
records = <Records>[];
json['records'].forEach((v) {
records!.add(new Records.fromJson(v));
});
}
total = json['total'];
size = json['size'];
current = json['current'];
pages = json['pages'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.records != null) {
data['records'] = this.records!.map((v) => v.toJson()).toList();
}
data['total'] = this.total;
data['size'] = this.size;
data['current'] = this.current;
data['pages'] = this.pages;
return data;
}
}
class Records {
String? id;
String? userId;
String? miId;
String? nickName;
int? genderCode;
String? profilePhoto;
String? content;
String? mediaUrls;
String? topicTags;
int? status;
bool? isLiked;
int? likeCount;
int? commentCount;
String? createTime;
Records(
{this.id,
this.userId,
this.miId,
this.nickName,
this.genderCode,
this.profilePhoto,
this.content,
this.mediaUrls,
this.topicTags,
this.status,
this.isLiked,
this.likeCount,
this.commentCount,
this.createTime});
Records.fromJson(Map<String, dynamic> json) {
id = json['id'];
userId = json['userId'];
miId = json['miId'];
nickName = json['nickName'];
genderCode = json['genderCode'];
profilePhoto = json['profilePhoto'];
content = json['content'];
mediaUrls = json['mediaUrls'];
topicTags = json['topicTags'];
status = json['status'];
isLiked = json['isLiked'];
likeCount = json['likeCount'];
commentCount = json['commentCount'];
createTime = json['createTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['userId'] = this.userId;
data['miId'] = this.miId;
data['nickName'] = this.nickName;
data['genderCode'] = this.genderCode;
data['profilePhoto'] = this.profilePhoto;
data['content'] = this.content;
data['mediaUrls'] = this.mediaUrls;
data['topicTags'] = this.topicTags;
data['status'] = this.status;
data['isLiked'] = this.isLiked;
data['likeCount'] = this.likeCount;
data['commentCount'] = this.commentCount;
data['createTime'] = this.createTime;
return data;
}
}