import '../booking_service/Address.dart'; import 'Product.dart'; class ProductDetail { ProductDetail({ this.id, this.withinstallation, this.date, this.serviceduration, this.paymentMethod, this.requeststate, this.address, this.prioritys, this.product, this.timestamp, }); ProductDetail.fromJson(dynamic json) { id = json['id']; withinstallation = json['withinstallation']; date = json['date']; serviceduration = json['serviceduration']; paymentMethod = json['paymentMethod']; requeststate = json['requeststate']; address = json['address'] != null ? Address.fromJson(json['address']) : null; prioritys = json['prioritys']; product = json['product'] != null ? Product.fromJson(json['product']) : null; timestamp = json['timestamp']; } int? id; bool? withinstallation; int? date; double? serviceduration; String? paymentMethod; String? requeststate; Address? address; String? prioritys; Product? product; int? timestamp; Map toJson() { final map = {}; map['id'] = id; map['withinstallation'] = withinstallation; map['date'] = date; map['serviceduration'] = serviceduration; map['paymentMethod'] = paymentMethod; map['requeststate'] = requeststate; map['timestamp'] = timestamp; if (address != null) { map['address'] = address?.toJson(); } map['prioritys'] = prioritys; if (product != null) { map['product'] = product?.toJson(); } return map; } }