import 'article.dart'; import 'contact_person.dart'; import 'customer.dart'; import 'discount.dart'; import 'image.dart'; import 'note.dart'; import 'payment.dart'; import 'package:json_annotation/json_annotation.dart'; part 'delivery.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class DeliveryOptionDTO { DeliveryOptionDTO({ required this.numerical, required this.value, required this.display, required this.key, }); bool numerical; String value; String display; String key; factory DeliveryOptionDTO.fromJson(Map json) => _$DeliveryOptionDTOFromJson(json); Map toJson() => _$DeliveryOptionDTOToJson(this); } @JsonSerializable(fieldRename: FieldRename.snake) class DeliveryDTO { DeliveryDTO({ required this.internalReceiptNo, required this.specialAggreements, required this.currency, required this.notes, required this.totalPrice, required this.prepayment, required this.paymentAtDelivery, required this.desiredTime, required this.contactPerson, required this.articles, required this.totalNetValue, required this.totalGrossValue, required this.images, required this.customer, required this.finishedTime, required this.note, required this.state, required this.payment, required this.carId, required this.options, }); String internalReceiptNo; String? specialAggreements; CustomerDTO customer; String totalPrice; String desiredTime; String totalGrossValue; String totalNetValue; ContactPersonDTO contactPerson; String? currency; List articles; String note; String finishedTime; String carId; String state; String prepayment; String paymentAtDelivery; DiscountDTO? discount; PaymentMethodDTO payment; List notes; List images; List options; factory DeliveryDTO.fromJson(Map json) => _$DeliveryDTOFromJson(json); Map toJson() => _$DeliveryDTOToJson(this); }