114 lines
2.7 KiB
Dart
114 lines
2.7 KiB
Dart
class BioscaleOverviewForallDates {
|
|
bool? success;
|
|
String? message;
|
|
Authorisation? authorisation;
|
|
|
|
BioscaleOverviewForallDates({this.success, this.message, this.authorisation});
|
|
|
|
BioscaleOverviewForallDates.fromJson(Map<String, dynamic> json) {
|
|
success = json['success'];
|
|
message = json['message'];
|
|
authorisation = json['authorisation'] != null
|
|
? Authorisation.fromJson(json['authorisation'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['success'] = success;
|
|
data['message'] = message;
|
|
if (authorisation != null) {
|
|
data['authorisation'] = authorisation!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Authorisation {
|
|
List<UserData1>? userData;
|
|
|
|
Authorisation({this.userData});
|
|
|
|
Authorisation.fromJson(Map<String, dynamic> json) {
|
|
if (json['user_data'] != null) {
|
|
userData = <UserData1>[];
|
|
json['user_data'].forEach((v) {
|
|
userData!.add(UserData1.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
if (userData != null) {
|
|
data['user_data'] = userData!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class UserData1 {
|
|
int? id;
|
|
int? userId;
|
|
String? muscleRate;
|
|
String? bodyFat;
|
|
String? skeletalMuscle;
|
|
String? protein;
|
|
String? bmr;
|
|
String? water;
|
|
String? age;
|
|
String? weight;
|
|
String? deletedAt;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
|
|
UserData1(
|
|
{this.id,
|
|
this.userId,
|
|
this.muscleRate,
|
|
this.bodyFat,
|
|
this.skeletalMuscle,
|
|
this.protein,
|
|
this.bmr,
|
|
this.water,
|
|
this.age,
|
|
this.weight,
|
|
this.deletedAt,
|
|
this.createdAt,
|
|
this.updatedAt});
|
|
|
|
UserData1.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
userId = json['user_id'];
|
|
muscleRate = json['muscle_rate'];
|
|
bodyFat = json['body_fat'];
|
|
skeletalMuscle = json['skeletal_muscle'];
|
|
protein = json['protein'];
|
|
bmr = json['bmr'];
|
|
water = json['water'];
|
|
age = json['age'];
|
|
weight = json['weight'];
|
|
deletedAt = json['deleted_at'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['user_id'] = userId;
|
|
data['muscle_rate'] = muscleRate;
|
|
data['body_fat'] = bodyFat;
|
|
data['skeletal_muscle'] = skeletalMuscle;
|
|
data['protein'] = protein;
|
|
data['bmr'] = bmr;
|
|
data['water'] = water;
|
|
data['age'] = age;
|
|
data['weight'] = weight;
|
|
data['deleted_at'] = deletedAt;
|
|
data['created_at'] = createdAt;
|
|
data['updated_at'] = updatedAt;
|
|
return data;
|
|
}
|
|
}
|