backup. before shop update
This commit is contained in:
31
lib/models/extra_fee.dart
Normal file
31
lib/models/extra_fee.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
class ExtraFee {
|
||||
int id;
|
||||
String name;
|
||||
String description;
|
||||
double rate;
|
||||
double price;
|
||||
|
||||
ExtraFee.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'],
|
||||
name = json['name'],
|
||||
description = json['description'],
|
||||
rate = double.parse(json['rate'].toString()),
|
||||
price = double.parse(json['price'].toString());
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'description': description,
|
||||
'rate': rate,
|
||||
'price': price,
|
||||
};
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return json.encode(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user