add rate service
This commit is contained in:
25
lib/domain/entities/custom_duty.dart
Normal file
25
lib/domain/entities/custom_duty.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class CustomDuty {
|
||||
String id;
|
||||
String productType;
|
||||
String desc;
|
||||
double fee;
|
||||
CustomDuty({this.id, this.productType, this.desc, this.fee});
|
||||
|
||||
factory CustomDuty.fromMap(Map<String, dynamic> map, String id) {
|
||||
return CustomDuty(
|
||||
id: id,
|
||||
productType: map['product_type'],
|
||||
desc: map['desc'],
|
||||
fee: (map['fee'] ?? 0).toDouble(),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"id": id,
|
||||
'product_type': productType,
|
||||
'desc': desc,
|
||||
'fee': fee,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user