185 lines
4.9 KiB
Dart
185 lines
4.9 KiB
Dart
class GetmyJoinedGroupsModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
List<Data>? data;
|
|
|
|
GetmyJoinedGroupsModel(
|
|
{this.status, this.statusCode, this.message, this.data});
|
|
|
|
GetmyJoinedGroupsModel.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? id;
|
|
int? iamPrincipalXid;
|
|
int? manageGroupXid;
|
|
MyJoinedCommunityDetails? myJoinedCommunityDetails;
|
|
int? membersCount;
|
|
List<MembersProfilePhotos>? membersProfilePhotos;
|
|
GroupData? groupData;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.iamPrincipalXid,
|
|
this.manageGroupXid,
|
|
this.myJoinedCommunityDetails,
|
|
this.membersCount,
|
|
this.membersProfilePhotos,
|
|
this.groupData});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
iamPrincipalXid = json['iam_principal_xid'];
|
|
manageGroupXid = json['manage_group_xid'];
|
|
myJoinedCommunityDetails = json['my_joined_community_details'] != null
|
|
? new MyJoinedCommunityDetails.fromJson(
|
|
json['my_joined_community_details'])
|
|
: null;
|
|
membersCount = json['membersCount'];
|
|
if (json['members_profile_photos'] != null) {
|
|
membersProfilePhotos = <MembersProfilePhotos>[];
|
|
json['members_profile_photos'].forEach((v) {
|
|
membersProfilePhotos!.add(new MembersProfilePhotos.fromJson(v));
|
|
});
|
|
}
|
|
groupData = json['group_data'] != null
|
|
? new GroupData.fromJson(json['group_data'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['iam_principal_xid'] = this.iamPrincipalXid;
|
|
data['manage_group_xid'] = this.manageGroupXid;
|
|
if (this.myJoinedCommunityDetails != null) {
|
|
data['my_joined_community_details'] =
|
|
this.myJoinedCommunityDetails!.toJson();
|
|
}
|
|
data['membersCount'] = this.membersCount;
|
|
if (this.membersProfilePhotos != null) {
|
|
data['members_profile_photos'] =
|
|
this.membersProfilePhotos!.map((v) => v.toJson()).toList();
|
|
}
|
|
if (this.groupData != null) {
|
|
data['group_data'] = this.groupData!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class MyJoinedCommunityDetails {
|
|
int? id;
|
|
int? manageGroupXid;
|
|
int? manageCommunityXid;
|
|
CommunityData? communityData;
|
|
|
|
MyJoinedCommunityDetails(
|
|
{this.id,
|
|
this.manageGroupXid,
|
|
this.manageCommunityXid,
|
|
this.communityData});
|
|
|
|
MyJoinedCommunityDetails.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
manageGroupXid = json['manage_group_xid'];
|
|
manageCommunityXid = json['manage_community_xid'];
|
|
communityData = json['community_data'] != null
|
|
? new CommunityData.fromJson(json['community_data'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['manage_group_xid'] = this.manageGroupXid;
|
|
data['manage_community_xid'] = this.manageCommunityXid;
|
|
if (this.communityData != null) {
|
|
data['community_data'] = this.communityData!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class CommunityData {
|
|
int? id;
|
|
String? communityName;
|
|
|
|
CommunityData({this.id, this.communityName});
|
|
|
|
CommunityData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
communityName = json['community_name'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['community_name'] = this.communityName;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class MembersProfilePhotos {
|
|
int? id;
|
|
String? profilePhoto;
|
|
|
|
MembersProfilePhotos({this.id, this.profilePhoto});
|
|
|
|
MembersProfilePhotos.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
profilePhoto = json['profile_photo'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['profile_photo'] = this.profilePhoto;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class GroupData {
|
|
int? id;
|
|
String? title;
|
|
String? groupImage;
|
|
|
|
GroupData({this.id, this.title, this.groupImage});
|
|
|
|
GroupData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
title = json['title'];
|
|
groupImage = json['group_image'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['title'] = this.title;
|
|
data['group_image'] = this.groupImage;
|
|
return data;
|
|
}
|
|
}
|