34 lines
782 B
Dart
34 lines
782 B
Dart
class Customer {
|
|
String name;
|
|
String email;
|
|
String firstName;
|
|
String sex;
|
|
int age;
|
|
String active;
|
|
int customerId;
|
|
String password;
|
|
|
|
|
|
Customer({this.customerId, this.name, this.firstName, this.email, this.sex, this.age, this.active, this.password});
|
|
|
|
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',
|
|
"password": password,
|
|
};
|
|
} |