Some checks are pending
Flutter CI / build (push) Waiting to run
Co-authored-by: aider (ollama_chat/7b) <aider@aider.chat>
35 lines
690 B
Dart
35 lines
690 B
Dart
class Customer {
|
|
final int? id;
|
|
final String name;
|
|
final String phone;
|
|
final String address;
|
|
final String email;
|
|
|
|
Customer({
|
|
this.id,
|
|
required this.name,
|
|
required this.phone,
|
|
required this.address,
|
|
required this.email,
|
|
});
|
|
|
|
Map<String, dynamic> toMap() {
|
|
return {
|
|
'id': id,
|
|
'name': name,
|
|
'phone': phone,
|
|
'address': address,
|
|
'email': email,
|
|
};
|
|
}
|
|
|
|
factory Customer.fromMap(Map<String, dynamic> map) {
|
|
return Customer(
|
|
id: map['id'] as int?,
|
|
name: map['name'] as String,
|
|
phone: map['phone'] as String,
|
|
address: map['address'] as String,
|
|
email: map['email'] as String,
|
|
);
|
|
}
|
|
}
|