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

part 'car_add_response.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class CarAddResponseDTO {
  CarAddResponseDTO(
      {required this.succeeded,
        required this.message,
        required this.car});

  final bool succeeded;
  final String message;
  final CarDTO car;

  factory CarAddResponseDTO.fromJson(Map<String, dynamic> json) => _$CarAddResponseDTOFromJson(json);
  Map<dynamic, dynamic> toJson() => _$CarAddResponseDTOToJson(this);
}
