import 'delivery.dart';
import 'driver.dart';
import 'package:json_annotation/json_annotation.dart';

part 'delivery_response.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class DeliveryResponseDTO {
  DeliveryResponseDTO(
      {required this.deliveries,
      required this.driver,
      required this.discountArticleNumber});

  List<DeliveryDTO> deliveries;
  DriverDTO driver;
  String discountArticleNumber;

  factory DeliveryResponseDTO.fromJson(Map<String, dynamic> json) =>
      _$DeliveryResponseDTOFromJson(json);

  Map<dynamic, dynamic> toJson() => _$DeliveryResponseDTOToJson(this);
}
