import 'package:json_annotation/json_annotation.dart';
import 'car_dto.dart';

part 'delivery_dto.g.dart';

@JsonSerializable(explicitToJson: true)
class DeliveryDTO {
  @JsonKey(name: 'amount_deliveries')
  final int amountDeliveries;

  final CarDTO car;

  DeliveryDTO({
    required this.amountDeliveries,
    required this.car,
  });

  factory DeliveryDTO.fromJson(Map<String, dynamic> json) => _$DeliveryDTOFromJson(json);
  Map<String, dynamic> toJson() => _$DeliveryDTOToJson(this);
}