Files
Regroup/lib/Login/Model/LoginModel.dart

239 lines
7.2 KiB
Dart

class LoginModel {
String? status;
int? statusCode;
String? message;
Data? data;
LoginModel({this.status, this.statusCode, this.message, this.data});
LoginModel.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 {
String? accessToken;
UserData? userData;
Data({this.accessToken, this.userData});
Data.fromJson(Map<String, dynamic> json) {
accessToken = json['access-token'];
userData = json['user_data'] != null
? new UserData.fromJson(json['user_data'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['access-token'] = this.accessToken;
if (this.userData != null) {
data['user_data'] = this.userData!.toJson();
}
return data;
}
}
class UserData {
int? id;
int? principalTypeXid;
int? principalSourceXid;
String? oneSignalPlayerId;
String? googleId;
String? appleId;
String? facebookId;
String? microsoftId;
String? userName;
String? pin;
String? fullName;
String? gender;
String? dateOfBirth;
String? phoneNumber;
String? otherPhoneNumber;
String? emailAddress;
String? addressLine1;
String? addressLine2;
String? cityXid;
String? stateXid;
String? countryXid;
String? postCode;
String? lastLoginDatetime;
String? profilePhoto;
String? referralCode;
String? description;
String? about;
String? position;
String? trainingScores;
String? height;
String? weight;
String? battingAverage;
int? isProfileUpdated;
String? isActive;
int? groupNotification;
int? communityNotification;
int? followerNotification;
int? newFollowerNotification;
int? directMessageNotification;
String? createdBy;
String? modifiedBy;
String? deletedAt;
String? createdAt;
String? updatedAt;
UserData(
{this.id,
this.principalTypeXid,
this.principalSourceXid,
this.oneSignalPlayerId,
this.googleId,
this.appleId,
this.facebookId,
this.microsoftId,
this.userName,
this.pin,
this.fullName,
this.gender,
this.dateOfBirth,
this.phoneNumber,
this.otherPhoneNumber,
this.emailAddress,
this.addressLine1,
this.addressLine2,
this.cityXid,
this.stateXid,
this.countryXid,
this.postCode,
this.lastLoginDatetime,
this.profilePhoto,
this.referralCode,
this.description,
this.about,
this.position,
this.trainingScores,
this.height,
this.weight,
this.battingAverage,
this.isProfileUpdated,
this.isActive,
this.groupNotification,
this.communityNotification,
this.followerNotification,
this.newFollowerNotification,
this.directMessageNotification,
this.createdBy,
this.modifiedBy,
this.deletedAt,
this.createdAt,
this.updatedAt});
UserData.fromJson(Map<String, dynamic> json) {
id = json['id'];
principalTypeXid = json['principal_type_xid'];
principalSourceXid = json['principal_source_xid'];
oneSignalPlayerId = json['one_signal_player_id'];
googleId = json['google_id'];
appleId = json['apple_id'];
facebookId = json['facebook_id'];
microsoftId = json['microsoft_id'];
userName = json['user_name'];
pin = json['pin'];
fullName = json['full_name'];
gender = json['gender'];
dateOfBirth = json['date_of_birth'];
phoneNumber = json['phone_number'];
otherPhoneNumber = json['other_phone_number'];
emailAddress = json['email_address'];
addressLine1 = json['address_line1'];
addressLine2 = json['address_line2'];
cityXid = json['city_xid'];
stateXid = json['state_xid'];
countryXid = json['country_xid'];
postCode = json['post_code'];
lastLoginDatetime = json['last_login_datetime'];
profilePhoto = json['profile_photo'];
referralCode = json['referral_code'];
description = json['description'];
about = json['about'];
position = json['position'];
trainingScores = json['training_scores'];
height = json['height'];
weight = json['weight'];
battingAverage = json['batting_average'];
isProfileUpdated = json['is_profile_updated'];
isActive = json['is_active'];
groupNotification = json['group_notification'];
communityNotification = json['community_notification'];
followerNotification = json['follower_notification'];
newFollowerNotification = json['new_follower_notification'];
directMessageNotification = json['direct_message_notification'];
createdBy = json['created_by'];
modifiedBy = json['modified_by'];
deletedAt = json['deleted_at'];
createdAt = json['created_at'];
updatedAt = json['updated_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['principal_source_xid'] = this.principalSourceXid;
data['one_signal_player_id'] = this.oneSignalPlayerId;
data['google_id'] = this.googleId;
data['apple_id'] = this.appleId;
data['facebook_id'] = this.facebookId;
data['microsoft_id'] = this.microsoftId;
data['user_name'] = this.userName;
data['pin'] = this.pin;
data['full_name'] = this.fullName;
data['gender'] = this.gender;
data['date_of_birth'] = this.dateOfBirth;
data['phone_number'] = this.phoneNumber;
data['other_phone_number'] = this.otherPhoneNumber;
data['email_address'] = this.emailAddress;
data['address_line1'] = this.addressLine1;
data['address_line2'] = this.addressLine2;
data['city_xid'] = this.cityXid;
data['state_xid'] = this.stateXid;
data['country_xid'] = this.countryXid;
data['post_code'] = this.postCode;
data['last_login_datetime'] = this.lastLoginDatetime;
data['profile_photo'] = this.profilePhoto;
data['referral_code'] = this.referralCode;
data['description'] = this.description;
data['about'] = this.about;
data['position'] = this.position;
data['training_scores'] = this.trainingScores;
data['height'] = this.height;
data['weight'] = this.weight;
data['batting_average'] = this.battingAverage;
data['is_profile_updated'] = this.isProfileUpdated;
data['is_active'] = this.isActive;
data['group_notification'] = this.groupNotification;
data['community_notification'] = this.communityNotification;
data['follower_notification'] = this.followerNotification;
data['new_follower_notification'] = this.newFollowerNotification;
data['direct_message_notification'] = this.directMessageNotification;
data['created_by'] = this.createdBy;
data['modified_by'] = this.modifiedBy;
data['deleted_at'] = this.deletedAt;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
return data;
}
}