333 lines
9.3 KiB
Dart
333 lines
9.3 KiB
Dart
class GetuserdetailsModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
Data? data;
|
|
|
|
GetuserdetailsModel({this.status, this.statusCode, this.message, this.data});
|
|
|
|
GetuserdetailsModel.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
|
}
|
|
|
|
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!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
UserData? userData;
|
|
List<UserCommunity>? userCommunity;
|
|
List<UserGroups>? userGroups;
|
|
|
|
Data({this.userData, this.userCommunity, this.userGroups});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
userData = json['userData'] != null
|
|
? new UserData.fromJson(json['userData'])
|
|
: null;
|
|
if (json['userCommunity'] != null) {
|
|
userCommunity = <UserCommunity>[];
|
|
json['userCommunity'].forEach((v) {
|
|
userCommunity!.add(new UserCommunity.fromJson(v));
|
|
});
|
|
}
|
|
if (json['userGroups'] != null) {
|
|
userGroups = <UserGroups>[];
|
|
json['userGroups'].forEach((v) {
|
|
userGroups!.add(new UserGroups.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
if (this.userData != null) {
|
|
data['userData'] = this.userData!.toJson();
|
|
}
|
|
if (this.userCommunity != null) {
|
|
data['userCommunity'] =
|
|
this.userCommunity!.map((v) => v.toJson()).toList();
|
|
}
|
|
if (this.userGroups != null) {
|
|
data['userGroups'] = this.userGroups!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class UserData {
|
|
int? id;
|
|
int? principalTypeXid;
|
|
String? googleId;
|
|
String? appleId;
|
|
String? userName;
|
|
String? fullName;
|
|
String? gender;
|
|
String? dateOfBirth;
|
|
String? phoneNumber;
|
|
String? emailAddress;
|
|
String? addressLine1;
|
|
String? addressLine2;
|
|
String? postCode;
|
|
String? lastLoginDatetime;
|
|
String? profilePhoto;
|
|
int? isProfileUpdated;
|
|
String? isActive;
|
|
String? createdAt;
|
|
|
|
UserData(
|
|
{this.id,
|
|
this.principalTypeXid,
|
|
this.googleId,
|
|
this.appleId,
|
|
this.userName,
|
|
this.fullName,
|
|
this.gender,
|
|
this.dateOfBirth,
|
|
this.phoneNumber,
|
|
this.emailAddress,
|
|
this.addressLine1,
|
|
this.addressLine2,
|
|
this.postCode,
|
|
this.lastLoginDatetime,
|
|
this.profilePhoto,
|
|
this.isProfileUpdated,
|
|
this.isActive,
|
|
this.createdAt});
|
|
|
|
UserData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
principalTypeXid = json['principal_type_xid'];
|
|
googleId = json['google_id'];
|
|
appleId = json['apple_id'];
|
|
userName = json['user_name'];
|
|
fullName = json['full_name'];
|
|
gender = json['gender'];
|
|
dateOfBirth = json['date_of_birth'];
|
|
phoneNumber = json['phone_number'];
|
|
emailAddress = json['email_address'];
|
|
addressLine1 = json['address_line1'];
|
|
addressLine2 = json['address_line2'];
|
|
postCode = json['post_code'];
|
|
lastLoginDatetime = json['last_login_datetime'];
|
|
profilePhoto = json['profile_photo'];
|
|
isProfileUpdated = json['is_profile_updated'];
|
|
isActive = json['is_active'];
|
|
createdAt = json['created_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['principal_type_xid'] = this.principalTypeXid;
|
|
data['google_id'] = this.googleId;
|
|
data['apple_id'] = this.appleId;
|
|
data['user_name'] = this.userName;
|
|
data['full_name'] = this.fullName;
|
|
data['gender'] = this.gender;
|
|
data['date_of_birth'] = this.dateOfBirth;
|
|
data['phone_number'] = this.phoneNumber;
|
|
data['email_address'] = this.emailAddress;
|
|
data['address_line1'] = this.addressLine1;
|
|
data['address_line2'] = this.addressLine2;
|
|
data['post_code'] = this.postCode;
|
|
data['last_login_datetime'] = this.lastLoginDatetime;
|
|
data['profile_photo'] = this.profilePhoto;
|
|
data['is_profile_updated'] = this.isProfileUpdated;
|
|
data['is_active'] = this.isActive;
|
|
data['created_at'] = this.createdAt;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class UserCommunity {
|
|
int? id;
|
|
int? iamPrincipalXid;
|
|
int? manageCommunityXid;
|
|
String? joinedAt;
|
|
int? isActive;
|
|
CommunityData? communityData;
|
|
|
|
UserCommunity(
|
|
{this.id,
|
|
this.iamPrincipalXid,
|
|
this.manageCommunityXid,
|
|
this.joinedAt,
|
|
this.isActive,
|
|
this.communityData});
|
|
|
|
UserCommunity.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
iamPrincipalXid = json['iam_principal_xid'];
|
|
manageCommunityXid = json['manage_community_xid'];
|
|
joinedAt = json['joined_at'];
|
|
isActive = json['is_active'];
|
|
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['iam_principal_xid'] = this.iamPrincipalXid;
|
|
data['manage_community_xid'] = this.manageCommunityXid;
|
|
data['joined_at'] = this.joinedAt;
|
|
data['is_active'] = this.isActive;
|
|
if (this.communityData != null) {
|
|
data['community_data'] = this.communityData!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class CommunityData {
|
|
int? id;
|
|
String? communityProfilePhoto;
|
|
String? communityBannerImage;
|
|
String? communityName;
|
|
String? communityLocation;
|
|
String? communityDescription;
|
|
int? communityTypeXid;
|
|
int? activityXid;
|
|
int? isActive;
|
|
String? createdAt;
|
|
|
|
CommunityData(
|
|
{this.id,
|
|
this.communityProfilePhoto,
|
|
this.communityBannerImage,
|
|
this.communityName,
|
|
this.communityLocation,
|
|
this.communityDescription,
|
|
this.communityTypeXid,
|
|
this.activityXid,
|
|
this.isActive,
|
|
this.createdAt});
|
|
|
|
CommunityData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
communityProfilePhoto = json['community_profile_photo'];
|
|
communityBannerImage = json['community_banner_image'];
|
|
communityName = json['community_name'];
|
|
communityLocation = json['community_location'];
|
|
communityDescription = json['community_description'];
|
|
communityTypeXid = json['community_type_xid'];
|
|
activityXid = json['activity_xid'];
|
|
isActive = json['is_active'];
|
|
createdAt = json['created_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['community_profile_photo'] = this.communityProfilePhoto;
|
|
data['community_banner_image'] = this.communityBannerImage;
|
|
data['community_name'] = this.communityName;
|
|
data['community_location'] = this.communityLocation;
|
|
data['community_description'] = this.communityDescription;
|
|
data['community_type_xid'] = this.communityTypeXid;
|
|
data['activity_xid'] = this.activityXid;
|
|
data['is_active'] = this.isActive;
|
|
data['created_at'] = this.createdAt;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class UserGroups {
|
|
int? id;
|
|
int? iamPrincipalXid;
|
|
int? manageGroupXid;
|
|
String? createdAt;
|
|
GroupData? groupData;
|
|
|
|
UserGroups(
|
|
{this.id,
|
|
this.iamPrincipalXid,
|
|
this.manageGroupXid,
|
|
this.createdAt,
|
|
this.groupData});
|
|
|
|
UserGroups.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
iamPrincipalXid = json['iam_principal_xid'];
|
|
manageGroupXid = json['manage_group_xid'];
|
|
createdAt = json['created_at'];
|
|
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;
|
|
data['created_at'] = this.createdAt;
|
|
if (this.groupData != null) {
|
|
data['group_data'] = this.groupData!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class GroupData {
|
|
int? id;
|
|
int? manageGroupTypeXid;
|
|
String? title;
|
|
String? backgroundImage;
|
|
String? groupImage;
|
|
String? link;
|
|
String? description;
|
|
int? isActive;
|
|
String? createdAt;
|
|
|
|
GroupData(
|
|
{this.id,
|
|
this.manageGroupTypeXid,
|
|
this.title,
|
|
this.backgroundImage,
|
|
this.groupImage,
|
|
this.link,
|
|
this.description,
|
|
this.isActive,
|
|
this.createdAt});
|
|
|
|
GroupData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
manageGroupTypeXid = json['manage_group_type_xid'];
|
|
title = json['title'];
|
|
backgroundImage = json['background_image'];
|
|
groupImage = json['group_image'];
|
|
link = json['link'];
|
|
description = json['description'];
|
|
isActive = json['is_active'];
|
|
createdAt = json['created_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['manage_group_type_xid'] = this.manageGroupTypeXid;
|
|
data['title'] = this.title;
|
|
data['background_image'] = this.backgroundImage;
|
|
data['group_image'] = this.groupImage;
|
|
data['link'] = this.link;
|
|
data['description'] = this.description;
|
|
data['is_active'] = this.isActive;
|
|
data['created_at'] = this.createdAt;
|
|
return data;
|
|
}
|
|
}
|