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.
 
 
 
 
 

149 lines
3.9 KiB

class PostCommentData {
List<Records>? records;
int? total;
int? size;
int? current;
int? pages;
PostCommentData(
{this.records, this.total, this.size, this.current, this.pages});
PostCommentData.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? parentId;
String? content;
String? createTime;
List<ChildPostCommentList>? childPostCommentList;
Records(
{this.id,
this.userId,
this.miId,
this.nickName,
this.genderCode,
this.profilePhoto,
this.parentId,
this.content,
this.createTime,
this.childPostCommentList});
Records.fromJson(Map<String, dynamic> json) {
id = json['id'];
userId = json['userId'];
miId = json['miId'];
nickName = json['nickName'];
genderCode = json['genderCode'];
profilePhoto = json['profilePhoto'];
parentId = json['parentId'];
content = json['content'];
createTime = json['createTime'];
if (json['childPostCommentList'] != null) {
childPostCommentList = <ChildPostCommentList>[];
json['childPostCommentList'].forEach((v) {
childPostCommentList!.add(new ChildPostCommentList.fromJson(v));
});
}
}
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['parentId'] = this.parentId;
data['content'] = this.content;
data['createTime'] = this.createTime;
if (this.childPostCommentList != null) {
data['childPostCommentList'] =
this.childPostCommentList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ChildPostCommentList {
String? id;
String? userId;
String? miId;
String? nickName;
int? genderCode;
String? profilePhoto;
String? parentId;
String? content;
String? createTime;
Null? childPostCommentList;
ChildPostCommentList(
{this.id,
this.userId,
this.miId,
this.nickName,
this.genderCode,
this.profilePhoto,
this.parentId,
this.content,
this.createTime,
this.childPostCommentList});
ChildPostCommentList.fromJson(Map<String, dynamic> json) {
id = json['id'];
userId = json['userId'];
miId = json['miId'];
nickName = json['nickName'];
genderCode = json['genderCode'];
profilePhoto = json['profilePhoto'];
parentId = json['parentId'];
content = json['content'];
createTime = json['createTime'];
childPostCommentList = json['childPostCommentList'];
}
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['parentId'] = this.parentId;
data['content'] = this.content;
data['createTime'] = this.createTime;
data['childPostCommentList'] = this.childPostCommentList;
return data;
}
}