77 lines
1.7 KiB
Dart
77 lines
1.7 KiB
Dart
class Customer {
|
|
String name;
|
|
String email;
|
|
String firstname;
|
|
String sex;
|
|
int age;
|
|
String active;
|
|
int customerId;
|
|
String password;
|
|
int birthYear;
|
|
int weight;
|
|
String goal;
|
|
String fitnessLevel;
|
|
String bodyType;
|
|
int admin;
|
|
int trainer;
|
|
int dataPolicyAllowed;
|
|
String firebaseUid;
|
|
|
|
|
|
Customer({this.customerId,
|
|
this.name,
|
|
this.firstname,
|
|
this.email,
|
|
this.sex,
|
|
this.age,
|
|
this.active,
|
|
this.password,
|
|
this.birthYear,
|
|
this.bodyType,
|
|
this.fitnessLevel,
|
|
this.goal,
|
|
this.weight,
|
|
this.admin,
|
|
this.trainer,
|
|
this.dataPolicyAllowed,
|
|
this.firebaseUid,
|
|
});
|
|
|
|
Customer.fromJson(Map json) {
|
|
this.customerId = json['customerId'];
|
|
this.name = json['name'];
|
|
this.firstname = json['firstname'];
|
|
this.email = json['email'];
|
|
this.sex = json['sex'];
|
|
this.age = json['age'];
|
|
this.active = json['active'];
|
|
this.birthYear = json['birthYear'];
|
|
this.bodyType = json['bodyType'];
|
|
this.fitnessLevel = json['fitnessLevel'];
|
|
this.goal = json['goal'];
|
|
this.weight = json['weight'];
|
|
this.admin = json['admin'];
|
|
this.trainer = json['trainer'];
|
|
this.firebaseUid = json['firebaseUid'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() =>
|
|
{
|
|
"name": name,
|
|
"firstname": firstname,
|
|
"email": email,
|
|
"age": age,
|
|
"sex": sex,
|
|
"active": 'Y',
|
|
"password": password,
|
|
"birthYear": birthYear,
|
|
"bodyType": bodyType,
|
|
"fitnessLevel": fitnessLevel,
|
|
"goal": goal,
|
|
"weight": weight,
|
|
"admin": admin,
|
|
"trainer": trainer,
|
|
"dataPolicyAllowed": dataPolicyAllowed,
|
|
};
|
|
}
|