add payment methods
This commit is contained in:
@@ -9,25 +9,23 @@ class FAQ {
|
||||
String question(bool isEng) => isEng ? questionEng : questionMm;
|
||||
String answer(bool isEng) => isEng ? answerEng : answerMm;
|
||||
|
||||
Map<String, String> imageUrls;
|
||||
FAQ(
|
||||
{this.id,
|
||||
this.sn,
|
||||
this.questionEng,
|
||||
this.questionMm,
|
||||
this.answerEng,
|
||||
this.answerMm,
|
||||
this.imageUrls});
|
||||
FAQ({
|
||||
this.id,
|
||||
this.sn,
|
||||
this.questionEng,
|
||||
this.questionMm,
|
||||
this.answerEng,
|
||||
this.answerMm,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'sn':sn,
|
||||
'sn': sn,
|
||||
'question_eng': questionEng,
|
||||
'answer_eng': answerEng,
|
||||
'question_mm': questionMm,
|
||||
'answer_mm': answerMm,
|
||||
'images': imageUrls,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,7 +37,6 @@ class FAQ {
|
||||
answerEng: map['answer_eng'],
|
||||
questionMm: map['question_mm'],
|
||||
answerMm: map['answer_mm'],
|
||||
imageUrls: Map.from(map['images'] ?? Map<String, String>()),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
42
lib/fcs/common/domain/entities/payment_method.dart
Normal file
42
lib/fcs/common/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,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -24,10 +24,11 @@ class Setting {
|
||||
String facebookLink;
|
||||
bool inviteRequired;
|
||||
String appUrl;
|
||||
final String termsEng;
|
||||
final String termsMm;
|
||||
|
||||
final String okEnergyId;
|
||||
final String about;
|
||||
final String terms;
|
||||
int poExpireInHours;
|
||||
int doExpireInHours;
|
||||
int poOpenAt;
|
||||
@@ -88,9 +89,10 @@ class Setting {
|
||||
this.facebookLink,
|
||||
this.inviteRequired,
|
||||
this.appUrl,
|
||||
this.termsEng,
|
||||
this.termsMm,
|
||||
this.about,
|
||||
this.okEnergyId,
|
||||
this.terms,
|
||||
this.poExpireInHours,
|
||||
this.doExpireInHours,
|
||||
this.poOpenAt,
|
||||
@@ -136,7 +138,8 @@ class Setting {
|
||||
emailAddress: map['email_address'],
|
||||
facebookLink: map['facebook_link'],
|
||||
about: map['about'],
|
||||
terms: map['terms'],
|
||||
termsEng: map['terms_eng'],
|
||||
termsMm: map['terms_mm'],
|
||||
priceLastUpdate: ts?.toDate(),
|
||||
okEnergyId: map['ok_energy_id'],
|
||||
poExpireInHours: map['po_expire_hours'],
|
||||
@@ -161,7 +164,8 @@ class Setting {
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'terms': terms,
|
||||
'terms_eng': termsEng,
|
||||
'terms_mm': termsMm,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
import 'package:fcs/fcs/common/domain/entities/setting.dart';
|
||||
|
||||
class Term {
|
||||
String term;
|
||||
String termEng;
|
||||
String termMm;
|
||||
|
||||
Term({
|
||||
this.term,
|
||||
});
|
||||
Term({this.termEng, this.termMm});
|
||||
|
||||
factory Term.fromSetting(Setting setting) {
|
||||
return Term(
|
||||
term: setting.terms,);
|
||||
return Term(termEng: setting.termsEng, termMm: setting.termsMm);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'terms': term,
|
||||
'terms_eng': termEng,
|
||||
'terms_mm': termMm,
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Contact{terms:$term}';
|
||||
return 'Contact{terms_eng:$termEng}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user