2020-10-15 03:06:13 +06:30
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-10-22 04:14:53 +06:30
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) => other is CustomDuty && other.id == id;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => id.hashCode;
|
2020-10-15 03:06:13 +06:30
|
|
|
}
|