class InputModel { String szDocumentId; String szUserId; String szDate; int nOdometer; double mnLiters; double mnPricePerLiter; String szLocation; double? mnTotalPrice; InputModel({required this.szDocumentId, required this.szUserId, required this.szDate, required this.nOdometer, required this.mnLiters, required this.mnPricePerLiter, required this.szLocation, this.mnTotalPrice}); factory InputModel.fromJson(Map json) { return InputModel( szDocumentId: json['szDocumentId'] as String, szUserId: json['szUserId'] as String, szDate: json['szDate'] as String, nOdometer: json['nOdometer'] as int, mnLiters: json['mnLiters'] as double, mnPricePerLiter: json['mnPricePerLiter'] as double, szLocation: json['szLocation'] as String, mnTotalPrice: (json['mnLiters'] as double) * (json['mnPricePerLiter'] as double), ); } Map toJson() { return { 'szDocumentId': szDocumentId, 'szUserId': szUserId, 'szDate': szDate, 'nOdometer': nOdometer, 'mnLiters': mnLiters, 'mnPricePerLiter': mnPricePerLiter, 'szLocation': szLocation, }; } }