workouttest_app/lib/model/customer.dart
2020-05-24 10:04:37 +02:00

32 lines
715 B
Dart

class Customer {
String name;
String email;
String firstName;
String sex;
int age;
String active;
int customerId;
Customer({this.customerId, this.name, this.firstName, this.email, this.sex, this.age, this.active});
Customer.fromJson(Map json) {
this.customerId = json['customer_id'];
this.name = json['name'];
this.firstName = json['firstname'];
this.email = json['email'];
this.sex = json['sex'];
this.age = json['age'];
this.active = json['active'];
}
Map<String, dynamic> toJson() =>
{
"name": name,
"firstName": firstName,
"email": email,
"age": age,
"sex": sex,
"active": 'Y'
};
}