clean up
This commit is contained in:
42
lib/domain/entities/payment_method.dart
Normal file
42
lib/domain/entities/payment_method.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
class PaymentMethod {
|
||||
String id;
|
||||
String name;
|
||||
String accountName;
|
||||
String account;
|
||||
String phone;
|
||||
String email;
|
||||
String link;
|
||||
|
||||
PaymentMethod(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.accountName,
|
||||
this.account,
|
||||
this.phone,
|
||||
this.email,
|
||||
this.link});
|
||||
|
||||
factory PaymentMethod.fromMap(Map<String, dynamic> map, String id) {
|
||||
return PaymentMethod(
|
||||
id: id,
|
||||
name: map['name'],
|
||||
accountName: map['account_name'],
|
||||
account: map['account'],
|
||||
phone: map['phone'],
|
||||
email: map['email'],
|
||||
link: map['link'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'name': name,
|
||||
"account_name": accountName,
|
||||
"account": account,
|
||||
"phone": phone,
|
||||
"email": email,
|
||||
"link": link,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user