You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
841 B
29 lines
841 B
|
2 months ago
|
class TankersModel {
|
||
|
|
String tanker_name = '';
|
||
|
|
String address = '';
|
||
|
|
String type_of_water = '';
|
||
|
|
String capacity = '';
|
||
|
|
String dbId = '';
|
||
|
|
String status='';
|
||
|
|
String license_plate='';
|
||
|
|
String supplier_name='';
|
||
|
|
List<String> availability= ['filled', 'available'];
|
||
|
|
TankersModel();
|
||
|
|
|
||
|
|
factory TankersModel.fromJson(Map<String, dynamic> json){
|
||
|
|
TankersModel rtvm = new TankersModel();
|
||
|
|
|
||
|
|
rtvm.tanker_name = json['tankerName']?? '';
|
||
|
|
rtvm.dbId = json['_id']?? '';
|
||
|
|
rtvm.address = json['supplier_address']?? '';
|
||
|
|
rtvm.type_of_water = json['typeofwater'] ?? '';
|
||
|
|
rtvm.capacity = json['capacity'] ?? '';
|
||
|
|
rtvm.license_plate = json['license_plate'] ?? '';
|
||
|
|
rtvm.supplier_name = json['supplier_name'] ?? '';
|
||
|
|
|
||
|
|
return rtvm;
|
||
|
|
}
|
||
|
|
Map<String, dynamic> toJson() => {
|
||
|
|
"boreName":this.tanker_name,
|
||
|
|
};
|
||
|
|
}
|