92 lines
2.4 KiB
Dart
92 lines
2.4 KiB
Dart
class FollowingModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
List<Data>? data;
|
|
|
|
FollowingModel({this.status, this.statusCode, this.message, this.data});
|
|
|
|
FollowingModel.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
if (json['data'] != null) {
|
|
data = <Data>[];
|
|
json['data'].forEach((v) {
|
|
data!.add(new Data.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['status'] = this.status;
|
|
data['status_code'] = this.statusCode;
|
|
data['message'] = this.message;
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
int? followingIamPrincipalXid;
|
|
int? iamPrincipalXid;
|
|
Following? following;
|
|
|
|
Data({this.followingIamPrincipalXid, this.iamPrincipalXid, this.following});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
followingIamPrincipalXid = json['following_iam_principal_xid'];
|
|
iamPrincipalXid = json['iam_principal_xid'];
|
|
following = json['following'] != null
|
|
? new Following.fromJson(json['following'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['following_iam_principal_xid'] = this.followingIamPrincipalXid;
|
|
data['iam_principal_xid'] = this.iamPrincipalXid;
|
|
if (this.following != null) {
|
|
data['following'] = this.following!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Following {
|
|
int? id;
|
|
String? userName;
|
|
String? fullName;
|
|
String? profilePhoto;
|
|
int? principleTypeXid;
|
|
|
|
Following(
|
|
{this.id,
|
|
this.userName,
|
|
this.fullName,
|
|
this.profilePhoto,
|
|
this.principleTypeXid});
|
|
|
|
Following.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
userName = json['user_name'];
|
|
fullName = json['full_name'];
|
|
profilePhoto = json['profile_photo'];
|
|
principleTypeXid = json['principal_type_xid'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['user_name'] = this.userName;
|
|
data['full_name'] = this.fullName;
|
|
data['profile_photo'] = this.profilePhoto;
|
|
data['principal_type_xid'] = this.principleTypeXid;
|
|
|
|
return data;
|
|
}
|
|
}
|